Lemmy Today
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 18 hours ago

Which of these javascript expressions is false?

lemmy.ml

message-square
47
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
293

Which of these javascript expressions is false?

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 18 hours ago
message-square
47
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • sorter_plainview
    link
    fedilink
    arrow-up
    43
    ·
    15 hours ago
    Spoiler

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

    • skisnow@lemmy.ca
      link
      fedilink
      English
      arrow-up
      14
      ·
      13 hours 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
        1
        ·
        2 hours 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.

  • 1.81K users / day
  • 4.66K users / week
  • 8.26K users / month
  • 17.9K users / 6 months
  • 120 local subscribers
  • 23.3K subscribers
  • 1.41K Posts
  • 51.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org