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.
Uint8Array.of(1)
Uint8Array [1]
Uint8Array.of(1, 2, 3)
Uint8Array [1, 2, 3]
// Difference from constructor:
print(new Uint8Array(3))
print(Uint8Array.of(3))
0,0,0
3