L E F L I
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 1 年前

Which of these javascript expressions is false?

lemmy.ml

message-square
83
link
fedilink
502

Which of these javascript expressions is false?

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 1 年前
message-square
83
link
fedilink
  • sorter_plainview@lemmy.today
    link
    fedilink
    arrow-up
    62
    ·
    1 年前
    Spoiler

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

    • skisnow@lemmy.ca
      link
      fedilink
      English
      arrow-up
      24
      ·
      1 年前

      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
        5
        ·
        1 年前

        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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

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

  • 1.08K users / day
  • 3.26K users / week
  • 7.31K users / month
  • 15K users / 6 months
  • 1 local subscriber
  • 33.3K subscribers
  • 2.39K Posts
  • 85.3K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.19
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org