While Loops 8


#1

for(var i = 1; i >11; i++);
console.log(i < 2);

understand = true

var soloLoop = function(){
//Your code goes here!
while(understand){
console.log("Looped once!");
understand = false
}
};

soloLoop()
dont understand


#2

It seems as you just forgot to end a few lines. When you declared understand you forgot to close it:

understand = true;

and inside your while statement you forgot to close it again once you renamed it:

understand = false;

then when you called soloLoop, you forgot to close it as well:

soloLoop();

#3

your while look is good apart from a few missing semi-colons like @d4ym0n points out , your for loop looks a bit funky. there are a few problems:
you end your for loop with a semi-colon, you should have curly brackets to execute your console.log:

for(var i = 1; i >11; i++){
  console.log(" ");
}

now technically this will pass the exercise, but your for loop will not execute. you assign a variable i a value of one. then you check if is bigger then 11 (i > 11), 1 is smaller then 11, so the loop exits. i would do the reverse: (i < 11) this will print out the numbers 1 till 10:

for(var i = 1; i <11; i++){
  console.log(i);
}

i am not sure why you have i < 2 in your console.log, i removed it