Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
WTF is this shit? Multiply by 0 * Math.pow(2,0) upto Math.pow(2, 10).
Like why the fuck would you write that and not write a comment as to why that logic and explain everything else. Fucking fuck.
Turns out this logic is supposed to mimic the back end logic of breaking the flag value into binary and then set other flags depending on each bit. But why would you do that? I was starting to doubt if 0*n = 0.
This piece of code is inefficient, trying to be smartass, doesn't explain shit and doesn't have the only comment that mattered.
undefined