In Javascript, floating point numbers are stored as double precision values . They have about 16 significant digits, which means that a 17-digit number will not necessarily be accurately stored.
You can specify numbers of any length up to parseFloat() , but cannot store more than 1.79769 & times; 10 308 which is the largest possible value that can be stored in a double precision variable.
I would recommend reading this if you have the time: What every computer scientist needs to know about floating point arithmetic
source share