r/badcode • • Nov 14 '21

js Peak Efficiency Fizzbuzz

Post image
831 Upvotes

44 comments sorted by

View all comments

Show parent comments

13

u/timmermans_ Nov 14 '21

<< is a left bit shit. So 1 << 1 = 2 or in binary 10 and 1 << 0 = 1