mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-13 18:24:39 +02:00
[javascript] Added note about ints
This commit is contained in:
@@ -38,6 +38,8 @@ doStuff()
|
|||||||
// 1. Numbers, Strings and Operators
|
// 1. Numbers, Strings and Operators
|
||||||
|
|
||||||
// Javascript has one number type (which is a 64-bit IEEE 754 double).
|
// Javascript has one number type (which is a 64-bit IEEE 754 double).
|
||||||
|
// As with Lua, don't freak out about the lack of ints: doubles have a 52-bit
|
||||||
|
// mantissa, which is enough to store integers up to about 9✕10¹⁵ precisely.
|
||||||
3; // = 3
|
3; // = 3
|
||||||
1.5; // = 1.5
|
1.5; // = 1.5
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user