The suggested answer in curriculum is wrong

This is the suggested answer website.

The correct answer should be:

var myArray = [];

var i=0;

while(i<6){

    myArray.push(i);

    i++;

}

your solution doesn’t pass this test:

myArray should equal [5,4,3,2,1,0]


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Ohh, suddenly I got it. Sorry for the inconvenient cause, this is my first post.