fromintermediateconst arr = Int32Array.from({ length: 3, 0: 10, 1: 20, 2: 30 });
// Int32Array [10, 20, 30]Array-like objects with a length property work with TypedArray.from().
Create a typed array from an array-like object with a length property using a map function.