Check this:
parseInt("10150878873354251");
returns 10150878873354252 using chrome 22.
Why is it incrementing by +1?
Printable View
Check this:
parseInt("10150878873354251");
returns 10150878873354252 using chrome 22.
Why is it incrementing by +1?
That's a pretty big number... it's probably greater than Chrome can handle properly. If you test several similar numbers (10150878873354253, 10150878873354254, 10150878873354255, 10150878873354256 etc.) you can see that every other number fail to parse correctly.
So, too big number! :)
Javascript integers are in the range -2^53 and +2^53 (−9007199254740992 to 9007199254740992)
The value you have there is way out of range.
You learn something new everyday! The number is a fb id for a photo. My mistake is using the id as a number instead of a string which probably makes more sense.
Thanks for the info!