11/11 Error


#1

whileCount = 0

while(whileCount != 1) {
console.log("While loop OK")
whileCount = 1
}

for(var i = 0; i != 1; i++) {
console.log("For loop OK")
}

doCount = false

do {
console.log("Do loop OK");
} while (doCount);

When this code is ran, I am told that there is no while or do/while loop. Why?


#2

A small, but crucial mistake. When making your whileCount and doCount, you forgot the "var" at the beginning...