11.Review: Browser Crashing For Simple Code


#1



https://www.codecademy.com/courses/javascript-beginner-en-ASGIv/2/4?curriculum_id=506324b3a7dffd00020bf661#


The browser keeps crashing despite having checked syntax for mistakes. I referenced the hints, yet it keeps crashing. The code is really simple, but it keeps crashing my browser.


for (var i = 1; i < 10; i++){
    console.log("I am "+i+" years old!");
}

var aye = true;
while (aye) {
    console.log("Doge.");
    aye = false;
}

var lol = false;
do {
    console.log(4+8);
    lol = true;
} while (lol);


11. Review unexpected token
#2

Change your do / while loop for this:

var lol = true;
do {
    console.log(4+8);
    lol = false;
} while (lol);

#3

Thanks! The hint did say that the condition could start as false, but I guess not.