Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
Franciscouzo
5y ago
0 comments
Share
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
undefined | Better HN
0 comments
default
newest
oldest
gizmo686
5y ago
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.
j
/
k
navigate · click thread line to collapse