Modify Array Data With Indexes Help

Modify Array Data With Indexes Help


Tell us what’s happening:

I’m a little confused on how to do this. I don’t need the answer just maybe a clear explanation?

Your code so far

// Example
var ourArray = [1,2,3];
ourArray[1] = 3; // ourArray now equals [1,3,3].

// Setup
var myArray = [1,2,3];

// Only change code below this line.

var myArray = [3,2,3];
var myArray = [0]= 3; // myArray now equals [3,2,3].```
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36```.

**Link to the challenge:**


Thing 1: You only ever need to declare a variable once. (“Declaring a variable” is when you first create it with the var keyword. Once it has been declared you can use. No need for the var keyword again.)
Thing 2: var myArray = [0]= 3; You don’t want to sandwich something between two assignment operators (=) like this. Look more carefully at the example.


Thank you! That helped so much!