8. When to 'while' and when to 'for'


#1

I didn't see a Dragon Slayer part yet, but I am in 8.

I created this code, a for and a while loop:

i=0;
while (i<5){
console.log("While times " + i + ".");
i++;
}
for (var i=0; i<5; i++){
console.log("For times " + i + ".");
}

Javascript tells me:") expected." But there's no way I can add another ).


#2

When I posted it I saw that a + was missing in the log... Sorry...