Why is "false" being logged?


#1

Code works fine and passes the test, no problems there.

What bothers me though is that below "Less is more!" the program also returns "false". Why is that?

var bool = true;

while(bool){
    console.log("Less is more!");
    bool = false;
}


#2

The last value appears in the console even if it wasn't printed using console.log().

Here is a more complete explanation.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.