I need a code check!


I wrote this code for the rewiew and It says something's wrong with my synax. Can someone please check it?!

// Write your code below!
var myStuff = [43, 'hat', 'gnat'];

for(i=0; i > myStuff.length; i++;){
    console.log("for loop's done")

var number = true

    console.log("Number is between 1 and 10");

    console.log("The number is less than 5")
    number = false;


Hey @cloud12345! Just a not needed semicolon in your for loop. Its in Bold

Hope it Helped!


That worked but now there's a infinite loop somewhere. Can you do another check? :game_die:


NVM I got it. I had to add

number = false

to my do/while part.


Sorry @cloud12345 i didnt mention this, but at the end of the do statement you cant just do while(number); Thats an infinite loop.

So change it to something like this

} while(number==true);


this is not an error but is it intended that this loop does not even run once?