function update(location) {
button1.innerText = location["button text"][0];
button2.innerText = location["button text"][1];
button3.innerText = location["button text"][2];
button1.onclick = goStore["button functions"][0];
button2.onclick = goCave["button functions"][1];
button3.onclick = fightDragon["button functions"][2];
text.innerText = "You are in the town square. You see a sign that says \"Store.\"";
}
I don’t understood who is the problems
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 67
function update(location) {
button1.innerText = location['button text'][0];
button2.innerText = location['button text'][1];
button3.innerText = location['button text'][2];
button1.onclick = goStore['button functions'][0];
button2.onclick = goCave['button functions'][1];
button3.onclick = fightDragon['button functions'][2];
text.innerText = "You are in the town square. You see a sign that says \"Store.\"";
}
I tried to change de double quotes with the singles ’
Hey @MaryGothic,
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
button1.innerText = location['button text'][0];
button2.innerText = location['button text'][1];
button3.innerText = location['button text'][2];
button1.onclick = goStore['button functions'][0];
button2.onclick = goCave['button functions'][1];
button3.onclick = fightDragon['button functions'][2];
text.innerText = "You are in the town square. You see a sign that says \"Store.\"";
button1.innerText = location['button text'][0];
button2.innerText = location['button text'][1];
button3.innerText = location['button text'][2];
button1.onclick = goStore['button functions'];
button2.onclick = goCave['button functions'];
button3.onclick = fightDragon['button functions'];
text.innerText = "You are in the town square. You see a sign that says \"Store.\"";