Iterate with JavaScript Do...While Loops new help

Iterate with JavaScript Do...While Loops new help
0

#1

Tell us what’s happening:
Hi i’m stuck here can anyone help me?

Your code so far


// Setup
var myArray = [];
var i = 10;

// Only change code below this line.
for (var i = 1; i < 6; i++){
  myArray.push(i);
}

while (i < 5) {
  myArray.push(i);
  i++;
}

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

What are you stuck on? You know how to make a do…while loop?


#3

What’s wrong in my answer ? it’s not working…


#4

You don’t have a do while loop. The instructions tell you how to make one.


#5

Ok thank you… i got it!