Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Franciscouzo
on Dec 29, 2020
|
parent
|
context
|
favorite
| on:
Teaching the Unfortunate Parts
You can actually do it (I'm not saying it's a good idea), there's a way to differentiate between -0 and 0:
> Object.is(0, -0) false
gizmo686
on Dec 29, 2020
[–]
I was going to make a comment about this not working for integer types; but then I remembered that JavaScript doesn't have integers, so I guess it technically works.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: