Help


#1


for(i = 10 ; i > 1 ; i / 3){
    console.log(i);
}

var city = true

var loop = function(){
while(city){
    console.log("yes");
    city = false;
}
}
var sleep = false
do{
    console.log("no");
}
while(sleep);

loop();


#2

this:

for(i = 10 ; i > 1 ; i / 3){
    console.log(i);
}

looks like an infinity loop, you never update i, look:

i = 10;
console.log(i/3); // will log 3.3333
console.log(i) // will log 10
i = i / 3
console.log(i) // will log 3.3333

see how you need to update i?


#3

oh, i get it. never stopped to think that that s why it was an infinity loop. was always looking at the others or the syntax.

thank you!


#4