Trouble with for loop lesson? Me or the webpage?

for (var i = 0; i < 6; i++) {
    myArray.push(i);
}

I must be not cut out for JS because I don’t see the problem here. This is for the lesson Basic JavaScript: Iterate with JavaScript For Loops. I even console.logged it and it counts to 5.

Edit: Cleared my browser cookies etc. just in case and nothing. I am truly stumped.

Okay now I know I’m not crazy. Can anyone assist me so I can move past this lesson?

nothing wrong here, can you provide the link of the challenge ?

look at this please: i = 0 vs. i = 1 :slight_smile:

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

console.log(myArray);
undefined
Array(5) [ 1, 2, 3, 4, 5 ]

it will not validate the test if that 0 is in the array…you basically got it already,

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

Yeah I guess turns out I should learn to read instructions. It says “1 to 5” not “0 to 5” even though that’s the typical standard for teaching these. Thanks for the assistance.

well everyone make mistakes, keep it up buddy