Https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop/

Https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop/
0

#1

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop/

Hello guys, I hope you are well!
I got a problem in here, when I press “Run the tests” is freezing, this is the first time when is freezing. Can someone help me?

Thank you.


#2

That probably means you have an infinite loop. Can you share your code?


#3

// Example
var ourArray = [];

for (var i = 0; i < 10; i += 2) {
ourArray.push(i);
}

// Setup
var myArray = [];

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

I changed i = 1, but still is freezing


#4

3 posts were split to a new topic: For loop issues causing tests to fail