Hi everybody. can anyone please help me with this step my code will not pass.
this is what I have to do:
Now update button2.innerText
and button3.innerText
to be assigned the second and third values of the button text
array, respectively.
function update(location) {
button1.innerText = location["button text"][0];
button2.innerText = location["Go to cave"][1];
button3.innerText = location["Fight dragon"][2];
button1.onclick = goStore;
button2.onclick = goCave;
button3.onclick = fightDragon;
text.innerText = "You are in the town square. You see a sign that says \"Store\".";
}```