Tell us what’s happening:
Describe your issue in detail here.
It say update the text.innerText there’s no inner text in the code.
Here is instruction:
Finally, update the text.innerText
assignment to equal the text
from the location
object. However, instead of using bracket notation, use dot notation.
Here is an example of accessing the name
property of an object called person
:
Your code so far
function update(location) {
button1.innerText = location[“button text”][0];
button2.innerText = location[“button text”][1];
button3.innerText = location[“button text”][2];
button1.onclick = location[“button functions”][0];
button2.onclick = location[“button functions”][1];
button3.onclick = location[“button functions”][2];
text.innerText = “You are in the town square. You see a sign that says "Store".”;
}
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 67