Are +0 and -0 the same?

后端 未结 9 2048
花落未央
花落未央 2020-11-22 07:45

Reading through the ECMAScript 5.1 specification, +0 and -0 are distinguished.

Why then does +0 === -0 evaluate to true<

9条回答
  •  自闭症患者
    2020-11-22 08:04

    I'd blame it on the Strict Equality Comparison method ( '===' ). Look at section 4d

    see 7.2.13 Strict Equality Comparison on the specification

提交回复
热议问题