I don’t know if it has been covered but my question is about the objects portion of this project. When declaring the variable “locations” in the lesson, we use “locations” not “location” . Then in future steps we call “location” in the update function. Are “locations” and “location” two independently different things, or does the JavaScript understand the grammatical rules pertaining to multiples where we add the s when referring to the whole array and take it away when pulling one item from it?
Ex.
const locations = [
{
name: “town square”,
“button text”: [“Go to store”, “Go to cave”, “Fight dragon”],
“button functions”: [goStore, goCave, fightDragon],…
function update(location) {
button1.innerText = location[“button text”][0];
button2.innerText = location[“button text”][1];
button3.innerText = location[“button text”][2];