Hello!
What kind of variables will NOT pass through this:
if(myVar){//code}
Boolean false? NULL? Boolean false and NULL? Anything else?
Thank you.
Hello!
What kind of variables will NOT pass through this:
if(myVar){//code}
Boolean false? NULL? Boolean false and NULL? Anything else?
Thank you.
All the following falsy values as:
null
undefined
NaN
0
""
(an empty string)false
Anything else converted to Boolean will yield true
.
More info:
ToBoolean
internal operation