Learn the all available methods related to Array in Javascript.

Different ways of creating array.

var array = [];
var array = Array();
var array = Array(3); // array of length 3
var array = new Array()
var array = new Array(3)  // array of length 3

1.Array.from()

Array.from method creates a new shallow copy from an array-like or iterable object.

Shallow copy is a bit-wise copy of an object. A new object is created that has an exact copy of the values in the original object. If any of the fields of the object are references to other objects, just the reference addresses are copied i.e., only the memory address is copied.(source : here)