Question 5/11


#1

Hi, everytime I try this, my browser keeps on crashing. Can someone please explain in depth as to why this occurs.

var understand = true;

while( understand ){
console.log("I'm learning while loops!");
understand = false;
}
console.log = ("I don't understand this!");

Thanks for the help!


#2

Actually it should not chrash your browser your code is perfect try to run the code again to see if it crashes.


#3

I'd agree with @s09abcd this code should not crash your browser the loop seems to be ok. But there might be a problem with this line:

console.log = ("I don't understand this!");

because this will overwrite the console.log function with the value "I don't understand this!" which in the progress leads to the problem that console.log is no longer a function so fix this:

console.log("I don't understand this!");

and refresh the page to reset console.log to it's built-in value.