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