lemmy.dexlit
  • Communities
  • Create Post
  • 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
76
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
461

Which of these javascript expressions is false?

lemmy.ml

@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 days ago
message-square
76
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • @sorter_plainview@lemmy.today
    link
    fedilink
    60•2 days ago
    Spoiler

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

    • @skisnow@lemmy.ca
      link
      fedilink
      English
      22•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
        link
        fedilink
        4•1 day 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
  • 2.79K users / day
  • 4.91K users / week
  • 8.36K users / month
  • 17.7K users / 6 months
  • 23.3K subscribers
  • 1.4K Posts
  • 49K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org