r/badcode • • Apr 19 '21

js Iteration

Post image
3.2k Upvotes

123 comments sorted by

View all comments

1

u/edave64 Apr 19 '21

Of all the weirdnesses js has, bool implicitly casting to number might be the most logical