Learn Basic JavaScript by Building a Role Playing Game - Step 114

Tell us what’s happening:

Do I need to add (4) in brackets to complete this

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function goFight() {
update(locations);
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 114

The lessons wants you to get the fourth object.
remember that arrays are zero based index.
that means we start counting at zero. not one

if you try to pass in 4 then you are technically trying to access the fifth object.

hope that helps

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.