Tell us what’s happening:
This isn’t passing on FCC, but will pass on the console in Chrome . the output is what is required by FCC to pass
Your code so far
// Setup
var myArray = [];
// Only change code below this line.
var i = 6;
while(i >= 0) {
myArray.push(i);
i = i - 1;
}
output … (6) [5, 4, 3, 2, 1, 0]
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
.
Challenge: Iterate with JavaScript While Loops
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops