8/11: Help, not sure exactly how to set this problem up


#1

var myCondition = true;

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


#2

Maybe have a look at this post about loops:

To your code:
This is an infinite loop:

var myCondition = true;

while(myCondition) {
    console.log();
}

This is a function call for a function that does not exist:

myCondition();

this is actually fine:

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

But you should add a var before the first use of i. And the } at the very end has no corresponding }


#3

my code look like this, but I dont know that it correctly 100%

var a = true;

while(a){
console.log(a);
a = false;
}

for(var i=0;i<10;i++){
console.log(i);
}


#4

Seems to be syntactically ok is it doing what you suppose it to do?


#5

thanks it is correct