I was using parseInt() to get some big prime numbers, but it's working as expected. For example,
parseInt("18014398241046527", 10); // Gives me 18014398241046528??
parseInt("18014398241046528", 10); // Gives me 18014398241046528
parseInt("18014398241046529", 10); // Still gives me 18014398241046528??
I tested them on both Chrome version 20.0.1132.47 and Firefox 12.0. Was this because the numbers that I was trying to parse were too large?
parseInt(), just the way JS numbers work. There are a few JS libraries around that can handle more significant digits, e.g., BigNumber.