The Number type has exactly 18437736874454810627 (that is, 264−253+3) values, representing the double-precision 64-bit format IEEE 754 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic
let a = new Float32Array(length); let b = new Float64Array(length);
But note that it's not supported in IE9, here browser compatibility table.
- But bitwise operations will convert it to a 32 bit integer.
- This is the only correct answer. It refers to and quotes the ECMAScript specification, which is the only source that matters. The other answer only has sources that are not definitive.