Dendarii
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
OsrsNeedsF2P@lemmy.ml to Programmer Humor@lemmy.ml · 2 years ago

Yup, Javascript can go F@#! itself

lemmy.ml

message-square
13
fedilink
14

Yup, Javascript can go F@#! itself

lemmy.ml

OsrsNeedsF2P@lemmy.ml to Programmer Humor@lemmy.ml · 2 years ago
message-square
13
fedilink
  • Björn Tantau@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Can someone explain this? I mean, the last result. Usually I can at least understand Javascript’s or PHP’s quirks. But this time I’m stumped.

    • mycus@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      JS null and undefined shenanigans


      basically:

      1. bigger an lesser comparison types convert null to zero, so is zero bigger or lesser than zero? no
      2. == is fucky and to it null only equals undefined and undefined only equals null (and themselves), so no
      3. is zero bigger than or equal to zero? yeah
      • Björn Tantau@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        2 years ago

        Ugh, thanks, of course. Stupid brain.

        • mycus@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          2 years ago

          I’m starting to think JS maintainers have a thing against mathematicians

          • Quik2007@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            more likely against humans

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 47 users / day
  • 76 users / week
  • 181 users / month
  • 1.6K users / 6 months
  • 0 local subscribers
  • 35.6K subscribers
  • 1.79K Posts
  • 36.9K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org