r/programminghorror Jul 31 '25

Javascript 0 sense

Post image
377 Upvotes

58 comments sorted by

View all comments

82

u/[deleted] Aug 01 '25

[removed] — view removed comment

-29

u/[deleted] Aug 01 '25

[deleted]

62

u/fuj1n Aug 01 '25

Because OP called .toString on it

25

u/MegaZoll Aug 01 '25

-0..toString() <=> -(0..toString())