Tell us what’s happening:
On lesson 92 of basic JavaScript: iterate with while loops, any test run on code that should produce the right output freezes and redirects me to a page say “aww snap…”. I have written the code in many forms that should produce the right output but every time the page freezes. if i enter the wrong code the tests will run and give me a build fail but the page will not freeze. I have also skipped the lesson and the test ran no problem and gave me the option to continue to the next lesson. Can anybody help me with an explanation. I cleared my cache, restarted me laptop, and am up to date on chrome. Any help is much appreciated. Also the lesson asks me to have the numbers listed in descending order from 5 - 0. In my research on the lesson i noticed it did not put that restriction on other versions of the lesson I researched on youtube to make sure I was doing it right.
Your code so far
// Setup
var myArray = [];
// Only change code below this line.
var i = 5;
while (i < 6) {
myArray.push(i);
i = i - 1;
}
Your browser information:*
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 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