Skip to content

Instantly share code, notes, and snippets.

@thawkin3
Last active March 4, 2020 20:39
Show Gist options
  • Save thawkin3/b75906dc581e5bdfe701685f1a0975d9 to your computer and use it in GitHub Desktop.
Save thawkin3/b75906dc581e5bdfe701685f1a0975d9 to your computer and use it in GitHub Desktop.
Working with large numbers without BigInt
const biggestNumber = Number.MAX_SAFE_INTEGER // 9007199254740991
const incorrectLargerNumber = biggestNumber + 10
// should be: 9007199254741001
// actually stored as: 9007199254741000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment