Skip to content

Instantly share code, notes, and snippets.

@vinyll
Created December 3, 2012 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinyll/4193564 to your computer and use it in GitHub Desktop.
Save vinyll/4193564 to your computer and use it in GitHub Desktop.
wtfjs parseint on big numbers
parseInt("10000000000000000", 10) + 1
//10000000000000000
parseInt("10000000000000000", 10) + 2
//10000000000000002
parseInt("10000000000000000", 10) + 3
//10000000000000004
parseInt("10000000000000000", 10) + 4
//10000000000000004
parseInt("10000000000000000", 10) + 5
//10000000000000004
parseInt("10000000000000000", 10) + 6
//10000000000000006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment