Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days ago

Which of these javascript expressions is false?

lemmy.ml

message-square
73
fedilink
478

Which of these javascript expressions is false?

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days ago
message-square
73
fedilink
  • sorter_plainview@lemmy.today
    link
    fedilink
    arrow-up
    61
    ·
    2 days ago
    Spoiler

    What is the rationale for all comparisons returning false for IEEE754 NaN values?

    • skisnow@lemmy.ca
      link
      fedilink
      English
      arrow-up
      23
      ·
      2 days ago

      That one wasn’t the one I had issues with, since the concept is essentially the same across all languages. We say it’s false because we can’t conclusively say that it’s true. Same as the reason why null != null in SQL.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 days ago

        It also makes a lot of conditional expressions less complicated because comparisons of all kind against NaN return false.

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 384 users / day
  • 4.31K users / week
  • 8.07K users / month
  • 17.7K users / 6 months
  • 1 local subscriber
  • 23.3K subscribers
  • 911 Posts
  • 18.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org