Returns a new typed array from the given elements.
of(...elements)
elements variadic
Elements to include in the new typed array object.
Returns a typed array.
Uint16Array.of(1)
Uint16Array [1]
Uint16Array.of(1, 2, 3)
Uint16Array [1, 2, 3]
// Difference from constructor:
print(new Uint16Array(3))
print(Uint16Array.of(3))
0,0,0
3