• shilangyu (lemmur)
    link
    fedilink
    12
    edit-2
    3 years ago

    I’m so bored of people bringing up NaN !== NaN when talking about “javascript’s wonkiness”. This is defined by IEEE for the floating point standard and it appears in any other language using IEEE 754 (which is the majority)

    • @handvat@lemmy.ml
      link
      fedilink
      53 years ago

      You shouldn’t attempt comparing 2 floating point numbers with simply == (or === in JavaScript) in most cases and in most languages anyways.

    • @spytfyre@lemmy.ml
      link
      fedilink
      13 years ago

      Totally agree. Moreover I can not think of a valid scenario where you would use such a comparison

  • shilangyu (lemmur)
    link
    fedilink
    83 years ago

    A reason not mentioned here which is the only reason I would not use TS is the setup it requires just to get started