Iterate with JavaScript For Loops help

Iterate with JavaScript For Loops help
0.0 0

#1

Tell us what’s happening:
whats wrong

Your code so far


// Example
var ourArray = [];

for (var i = 0; i < 5; i++) {
  ourArray.push(i);
}

// Setup
var myArray = [];

// Only change code below this line.

for (var i = 1; i < 6; i++){
  ourArray.push(i);
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops/


#2

You’re referencing ‘ourArray’ as per the example.

Change this to ‘myArray’ and you’re golden :+1:


#3

oh thanks alot ! for your Help