11/11 Review


#1

// I'm not sure what im doing wrong here, maybe its the order of the do/while/for?
// This is the error i'm getting: SyntaxError: missing while after do-loop body
// Some help would be nice :slightly_smiling:

var count = 0;
do
{
console.log("abrakadabra");
count++;
}
for(var i=1; i<11; i++){
console.log(i);
}
condition = true;
while(condition)
{
console.log("kutopdracht");
condition = false;
};


#2

Hi here what the error says.

SyntaxError: missing while after do-loop body

var count = 0;
do
{
console.log("abrakadabra");
count++;
}

the while do it like that

do {
   #do Something 

}while (condition)

#3

// Thank you, after that i got an error for unexplained condition. Thats very true i didn't give "
// condition" a value ^^
// If i can help others finding their fault in this excercise, take a look at my code cuz this one did // the trick for me;).

var count = 0;
var condition = 0;
do {
console.log("abrakadabra");
count++;
}while (condition);
console.log("lemgardia leviosa");
condition = 0;

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