JavaScript Array.from() Function

JavaScript Logo

Array.from() – Creates a new, shallow-copied Array from an array-like or iterable object.

๐Ÿ‘‰ Syntax

Array.from(arrayLike[, mapFn[, thisArg]]);

๐Ÿงช Example

Array.from('abc'); // ['a','b','c']

Comments