JavaScript Array.of() Function

JavaScript Logo

Array.of() – Creates a new Array instance from a variable number of arguments, regardless of their number or type.

๐Ÿ‘‰ Syntax

Array.of(element1, element2, ...);

๐Ÿงช Example

Array.of(3); // [3]

Comments