Doing a straight-forward "if" seems too complicated. Let's reverse the logic.

  • 18
  • 10
    Time to go to bed buddy.
  • 4
    @Drillan767 fortunately it wasn't me, but a former employee of my company.
  • 3
    @ivoecpereira I'm relieved 😂😂
  • 5
    I like how the condition is negated
  • 2
    Since when is "length" a boolean? Is someone supposed to understand what this does?
  • 5

    0 evaluates to false in JavaScript (and most languages) so it's pretty common to write if(collection.length) rather than if(collection.length > 0)
  • 5
    @Qwby The "beauty" of JS.
  • 1
    @AngryMTUDev the latter is arguably more readable, I personally would prefer that one
  • 4
    Well it isn't not correct...
  • 2
    Double negation?!? 😂
  • 0
    I don't know if I ain't sure I ain't gonna do no nothing 8)
  • 1
    This feels like it should be a meme...
  • -1
    Wild AirAware drone appears!

    Drone yells "WRONG!"!
    It's so effective!

    Hint: It's not just JS. Go out to the real world, please.

  • 1
    @hch11 Idgaf if it's only JS or not. I never said that it's only JS anyway, so idk where the fuck you're going with that
  • 0
    Just sayin'

    When 'the "beauty" of x' is said, implicitly means 'the emblematic "beauty" of x', not necessarily unique; but it cannot be emblematic if literally almost all of its fellow neighbors have this same thing from time inmemorial. And it's more or less intuitive if a length method is used

    @aaxa @hch11
  • 1
    You're not "just sayin' " .
    You're making a hell of an interpretation. What you're telling me is, that you're implying I meant something that I didn't say.
    Fuck off will you? Don't put words in my mouth I did not say.
    Maybe you should take this kind of bs to where it belongs. The trash. Or 9gag.
  • 1
    But you obviously said that is "magic" (sarcastically speaking) and that's not true.

    It's logical that "not length" means "there's not length"

    At least I'm exposing and clarifying my point of view, and also not swearing or send other to annoy in others websites (supposedly) much worse than devRant; for me, that's even worse than the word "f***"

  • 1
    Oops, don't you actually send off me away of here, right? /s

  • 1
    @hch11 I don't really care man. I don't know what I did since you had to tell me to "go out to the real world" and telling me what I meant.

    Tbh, that's more rude than what I just told you to do. To fuck off, that is.

    There are two things that pisses me off the most with other people:
    1. Being late when having an appointment
    2. People telling me what I meant.

    You fall into the second category.
    It's freaking rude to do what you did.

    If you said something is green and I say to you: By saying that, you say that it's red.
    Wouldn't you find that annoying/rude?

    Ask for clarification instead of being a dick in the first place.
Add Comment