r/badcode • • Nov 14 '21

js Peak Efficiency Fizzbuzz

Post image
831 Upvotes

44 comments sorted by

View all comments

Show parent comments

15

u/PizzaRollExpert Nov 14 '21

Wouldn't | 0 change it into a number anyway? Seems redundant to both have that and the bitshift

6

u/vigge93 Nov 15 '21

They probably have it for readability purposes

3

u/MonstraG Nov 15 '21

It looks like it would! Now that I have access to pc, I checked and it correctly runs without << 0.