• Turun
    link
    fedilink
    161 year ago

    That’s because this is the maximum integer that can be stored in a double precision floating point number without loss of precision, lol

    • interolivary
      link
      fedilink
      71 year ago

      That’s one thing that really bugs me about Javascript (weirdly enough I’m okay with eg prototypal inheritance and how this works, or at least worked before the bolted on classes that were added because apparently I’m like one of the dozen or so people who had no problems with those concepts). The fact that all numbers are floats can lead to a lot of fun and exciting bugs that people might not even realize are there until they suddenly get a weird decimal where they expected an integer