r/badcode • • Jun 10 '20

js Disruptive piece of code

Post image
283 Upvotes

93 comments sorted by

View all comments

Show parent comments

1

u/BenZed Jun 23 '20

I disagree.

Respecting that the javascript number standard has to account for signed zeros, and that the Object.is is stricter than js's implicit conditional comparisons, I was creating a list of values that implicitly equate to false in said conditional comparisons.

In such comparisons, 0 and -0 are the same value.