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

Which of these javascript expressions is false?

lemmy.ml

message-square
52
fedilink
  • cross-posted to:
  • [email protected]
313

Which of these javascript expressions is false?

lemmy.ml

@[email protected] to Programmer [email protected] • 22 hours ago
message-square
52
fedilink
  • cross-posted to:
  • [email protected]
  • @[email protected]
    link
    fedilink
    47•19 hours ago
    Spoiler

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

    • @[email protected]
      link
      fedilink
      English
      15•17 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
        link
        fedilink
        1•5 hours 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
  • 109 users / day
  • 352 users / week
  • 1.03K users / month
  • 3.82K users / 6 months
  • 3 subscribers
  • 1.44K Posts
  • 50.8K 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