Skip to content

Instantly share code, notes, and snippets.

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