[1,2,3] // array literal
[...iterable] // spread operator
// Array() constructor
new Array() // === []
new Array(3) // === [,,,,] (compare with Array.of(3))
new Array(1,2,3) // === [1,2,3]
// Array.of() factory method (⭐️ ES6)
Array.of() // === []
Array.of(3) // === [3]
Array.of(1,2,3) // === [1,2,3]
// Array.from() factory method (⭐️ ES6)
Array.from(iterable) // === [...iterable]
Array.from(arrayLike) // array-like -> array
Array.from(iterableOrArrayLike, mapFunc, thisArg) // general form