Javascript | SoloLearn: Learn to code for FREE!



In a lesson they included this sentence as a note: "JavaScript numbers are always stored as double precision floating point numbers." So I don't really get it what they mean by "double precision floating point" Comments sections are confusing there ๐Ÿ˜ž It would be amazing if someone explains it๐Ÿ˜ Thank you for spending your time! Lesson (section 2)๐Ÿ‘‡

7/12/2019 10:33:55 PM

๐ŸงDaniel [I use Arch BTW]

3 Answers

New Answer


That would mean it uses 8 bytes for integer and non-integer numbers. Other languages like C, Java etc. also have the less precise (4 byte) single precision floating point numbers which JS doesn't.


A double-precision floating point number is a floating point number with the size of 8 bytes. Basically floating point is a number that can store fractional value, like 1.37, 0.153, 82.17, and so on. So, basically, floating point is a real number, not just an integer, and the double precision is used to indicate it's size, which is 8 bytes You can refer to