You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this can be explained with the following sentence from the Mozilla Javascript Reference Do not confuse the primitive Boolean values true and false with the true and false values of the Boolean object.
new Boolean(true) has a value of truebut it's not the same value as the primitive boolean value true
The Boolean object seem to get cast when using == but not when using ===.
ex.
new Boolean(true) == true // -> true
new Boolean(true) === true // -> false
new Boolean(false) == false // -> true
new Boolean(false) === false // -> false
The text was updated successfully, but these errors were encountered: