(DONE)Modify Array Data With Indexes it is correct?

Tell us what’s happening:

Your code so far


// Example
var ourArray = [18,64,99];
ourArray[1] = 45; // ourArray now equals [18,45,99].

// Setup
var myArray = [18,64,99];
myArray[1] = 45; // myArray now equals [45,66,99].
// Only change code below this line.


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes

Hey @ian,
Read the instructions in the challenge carefully.
Instruction says:

Modify the data stored at index 0 of myArray to a value of 45 .

You are not doing that.
Try solving now.

Hint: Arrays are zero-indexed.
Hope this helps.

1 Like

Yes it works thanks alot.