Look at me, I'm the magic increasing number!
9999999999999999
//=> 10000000000000000
--- @thomasfuchs
That's because 9999999999999999
> Number.MAX_SAFE_INTEGER
. That's the highest integer possible without loosing precision. You can check if your integer is save using Number.isSafeInteger()
.
To keep precision above that integer, you have to use BigInt
--- @shaedrich