freeCodeCamp/guide/english/javascript/standard-objects/array/array-from/index.md

398 B

title
Array from

Array from

The 'Array.from()' method creates a new Array instance from an array-like or iterable object.

Syntax:

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

Example:

''' Array.from('foo'); // ["f", "o", "o"] '''

More Information:

MDN Documentation