📜  javascript 检查负数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:24.780000             🧑  作者: 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)