We're a place where coders share, stay up-to-date and grow their careers.
I did some testing and unfortunately could not get them to produce different results with bitwise operators.
I have been looking at the spec for how it decides what to do and it seems that unless explicitly stated otherwise, -0 and 0 are treated the same.
-0
0
That’s unfortunate.
I did some testing and unfortunately could not get them to produce different results with bitwise operators.
I have been looking at the spec for how it decides what to do and it seems that unless explicitly stated otherwise,
-0
and0
are treated the same.That’s unfortunate.