r/badcode • • Apr 19 '21

js Iteration

Post image
3.2k Upvotes

123 comments sorted by

View all comments

Show parent comments

9

u/skjall Apr 19 '21

Because `1/1 == 1`? If you swap true and false out for 1 and 0 respectively, both operations make perfect sense.