73
priyan
7y

No comments😐😐

Comments
  • 10
    Well, it's not false...
  • 12
    When you need to make extra sure that `isEnable` didn't change since last evaluated.
  • 10
    So...
    If not enabled,
    Then not enabled,
    enableDisable...()
    What??
  • 3
    *facepalm*
  • 5
    that coding style, it kills me
  • 13
    I don't think comments would help me understand that code...
  • 0
    gotta be absolutely sure its true. Very important amirite
  • 9
    *paid by lines of code*
  • 5
    @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
  • 8
    Am I the only one who is annoyed by the name of the variable?

    isEnabled makes more sense to me then isEnable.
  • 2
    Looks 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.
  • 1
    Idea: 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?
  • 0
    You forgot a bracket, if(cudgushere) {
  • 0
    @RAZERZ no there shouldnt be a bracket (unless there was a closing one as well)
  • 0
    @Codex404 scuse me wat
  • 4
    It was all more or less meh, until thefuckingnamingexplodedandejaculatedthewholealphabetwice();
  • 4
    @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.
  • 0
    @Codex404 woah that's awesome and terrifying
  • 4
    Another beautifully described variable 😂
  • 0
    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!
  • 1
    @Codex404 No you are not the only one.
  • 0
    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
Add Comment