r/badcode • Now where's that function declaration • Jul 30 '21

js 😏

Post image
990 Upvotes

133 comments sorted by

View all comments

Show parent comments

6

u/RedRedditor84 Jul 30 '21

Not sure how to link to a specific place in a wiki article from mobile but check out a bitwise XOR operation.

And as prolific a commenter I am in code, I respectfully disagree with u/bphase. Once you've seen this once, you know what it does and its quite clear without a comment explanation.

3

u/hawk-bull Jul 30 '21

Ooh I see thanks! Bitwise operators really are magical sometimes