12.20 falsy变量

八个falsy变量,用于if判断或者逻辑符

There are 8 falsy values:

false The keyword false
0 The number zero
-0 The number negative zero
0n BigInt, when used as a boolean, follows the same rule as a Number. 0n is falsy.
"" Empty string value
null null - the absence of any value
undefined undefined - the primitive value
NaN NaN - not a number
原文地址:https://www.cnblogs.com/xjt31/p/14163680.html