Values in JavaScript can be divided into the following two categories:
A value that can be coerced to false
Other (values cast to true) The JavaScript specification specifically defines a small set of values that can be cast to false. The abstract operation ToBoolean is defined in section 9.2 of the ES5 specification, enumerating all possible outcomes . These are falsy values: • undefined • null • false • +0 , -0 and NaN • Boolean coercion of "" falsy value results in false .