
Javascript Truthy/Falsy
2015, May 21
Truthy from different aurgement type
- Undefined => false
- Null => false
- Boolean => The result equals the input argument (no conversion).
- Number => The result is false if the argument is +0, −0, or NaN; otherwise the result is true.
- String => The result is false if the argument is the empty String (its length is zero); otherwise the result is true.
- Object => true.