11/11


#1

It says 'SyntaxError: Unexpected token }' Can't seem to find which ones stuffing me up!!

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

var condition = true;

while(conditon) {
    console.log("Loop de Lop");
    condition = false;
}

var condition = false;

do {
    console.log("Printing only once sir!");
    condition = false;
}

while(condition);

};

#2

We normally keep the while() up with the do {} since it completes the statement.

do {
    # ...
} while (condtion);

Now we can see the stray }; that the error indicates.


#3

the last }; shouldn't be there. As you're closing a } you haven't opened.


#4

So why are you telling me? Isn't that what I just alluded to?