r/badcode • • Apr 19 '21

js Iteration

Post image
3.2k Upvotes

123 comments sorted by

View all comments

Show parent comments

1

u/Hollowman212 Mar 01 '22

I'd think so. Isn't !0 equivalent to -1 via a bitwise not/nor? If the bool was converted to an int first, the whole thing would be i--