Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] • 1 month ago

Which of these javascript expressions is false?

lemmy.ml

message-square
83
fedilink
  • cross-posted to:
  • [email protected]
499

Which of these javascript expressions is false?

lemmy.ml

@[email protected] to Programmer [email protected] • 1 month ago
message-square
83
fedilink
  • cross-posted to:
  • [email protected]
  • @[email protected]
    link
    fedilink
    63•1 month ago
    Spoiler

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

    • @[email protected]
      link
      fedilink
      English
      24•1 month 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
        5•1 month ago

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

Programmer [email protected]

[email protected]
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]

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
  • 8 users / day
  • 265 users / week
  • 1.54K users / month
  • 4.33K users / 6 months
  • 3 subscribers
  • 1.55K Posts
  • 55.1K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org