Ranter
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
Comments
-
chadd1746437y@mightyleguan
If true then false
If false then true
Else
If false then true
If true then false
Try is not null
Catch
Is null
Finally
Return false
//life is meaningless -
Am I the only one who is annoyed by the name of the variable?
isEnabled makes more sense to me then isEnable. -
m0j0nz0r3457yLooks like he is trying to make sure that if isEnable is truthy, it changes its type to boolean.
I would have done something like isEnable = !!isEnable;
So it also handles falsy => false conversions.
Unless there's a reason you wouldn't want that. -
p3rand0r877yIdea: let's assume you were the one who did that 7 years ago without knowing why. How would you guys justify yourself to a new guy you reaaally hate checking that code?
-
It was all more or less meh, until thefuckingnamingexplodedandejaculatedthewholealphabetwice();
-
@RAZERZ a lot of languages dont require brackets for if statements. If there are no brackets it will just be for the next statement though.
-
The fact they both have same colors this means both are function vars and not one in function and another is class var, unless I'm mistaken and this is not Java, and who the fuck wrote this code and got away with it!
-
He is probably trying to typecast the value to Boolean.
Like, if isEnable===1, then isEnable=true.
isEnabled = Boolean(isEnabled) would make so much more sense
No comments😐😐
undefined