Maximum length of Array

JavaScript arrays have a size limitation. They cannot be longer than (2^32 - 1), that is, 4294967295.

new Array(4294967296);
// RangeError: Invalid array length
new Array(4294967295);
// [empty × 4294967295]
Last updated on Thu Jan 07 2021
Tags: