Brevity


#1



can someone explain how the first one is the same as the second one in terms of while(bool) and while(bool === true)?


var bool = true;
while(bool){
    //Do something
}

var bool = true;
while(bool === true){
    //Do something
}


#2

Let's substitute the values of the variables where the variables are used:

var bool = true;
while(true){
    //Do something
}

var bool = true;
while(true=== true){
    //Do something
}

Of course true == true evaluates to true, so we get:

var bool = true;
while(true){
    //Do something
}

var bool = true;
while(true){
    //Do something
}

which are exactly identical.