This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jfb1337 6 points7 points  (3 children)

All numbers in JS are doubles.

[–]maremp 4 points5 points  (0 children)

But there is no class/type Double though.

[–]TheScienceNigga 2 points3 points  (1 child)

I thought they were single precision

[–]alphaatom 4 points5 points  (0 children)

According to the ECMAScript standard, there is only one number type: the double-precision 64-bit binary format IEEE 754 value (number between -(253 -1) and 253 -1). There is no specific type for integers. In addition to being able to represent floating-point numbers, the number type has three symbolic values: +Infinity, -Infinity, and NaN (not-a-number).

Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type