What should each of the following evaluate to?
#[+0] == #[-0]; #[+0] === #[-0]; Object.is(#[+0], #[-0]); #[NaN] == #[NaN]; #[NaN] === #[NaN]; Object.is(#[NaN], #[NaN]);
(For context, this is non-obvious because +0 === -0
is true
, Object.is(+0, -0)
is false
, NaN === NaN
is false
, and Object.is(NaN, NaN)
is true
.)
Personally I lean towards the -0
cases all being false
and the NaN
cases all being true
, so that the unusual equality semantics of -0
and NaN
do not propagate to the new kinds of objects being introduced by this proposal.
ljharb, littledan, rickbutton, kleinfreund, FireyFly and 8 moreMinusGix, devsnek and SebastianSimonyvele and papb
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4