ECMAscript 6 Array.of

Array.of will create a new Array instance from a group of elements, for example below script will create an array of 5 elements.

Array.of(1, 2, 3, 4, 5);   // [1, 2, 3, 4, 5]

If you want to create a more advance feature then you can always use Array.from instead.

Like this post? Kindly share!