js中Object.is与 === 的区别

134 阅读1分钟

+0 === -0 //true NaN === NaN // false Object.is(+0, -0) // false Object.is(NaN, NaN) // true 其余基本一致