Https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do---while-loops

Https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do---while-loops
0

#1

Tell us what’s happening:

can help please. . .:frowning:

Your code so far


// Setup
var myArray = [0];

// Only change code below this line.
var i = 10;
do {
  myArray.push(i);
  i++;
} while (i < 10);

console.log(myArray);

Your browser information:

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

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


#2

We don’t need to setup this array with Initial item 0, After loop we just need to have [10], currently It has [0,10].


#3

Many thanks Xaxx, great help