📌  相关文章
📜  检查数字是否为负 javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.260000             🧑  作者: Mango

代码示例2
(number < 0)

"-0" < 0 is false, which is consistent with the fact that -0 < 0 is also false (see: signed zero).
"-Infinity" < 0 is true (infinity is acknowledged)
"-1e0" < 0 is true (scientific notation literals are accepted)
"-0x1" < 0 is true (hexadecimal literals are accepted)
"  -1  " < 0 is true (some forms of whitespaces are allowed)