In JavaScript, the basic Array type is dynamic (no permanently fixed size, no fixed type). Typed arrays (Float32Array etc.) are statically sized at allocation time and only contain the specified type.
If you know how many items your dynamic Array is going to hold, you can pass that length into the constructor.
const myArray = new Array(100);
But this wonโt stop you from assigning off the end of the array if you so choose:
myArray[999] = โfooโ; // ๐