6 cases of boolean value false in JS

6 cases of boolean value false in JS

1. undefined (undefined, appears when the value is not found)
2. null (representing a null value)
3. false (false for a Boolean value, the string "false" boolean value is true) 4.
0 (number 0, string "0" Boolean value is true)
5. NaN (appears when the result cannot be calculated, indicating "not a number"; but typeof NaN === "number")
6, "" (double quotation mark) or'' (single quotation mark) ( Empty string, true if there is a space in between)

Guess you like

Origin blog.csdn.net/xiaoxiannv666/article/details/112859139