What is the use of Array.from() method in JavaScript?
Usage:
The Array.from()
method is used to get an Array object from any iterables like array, objects, and strings.
Example:
const arr = Array.from( "Sandeep" );
console.log( arr );
The Array.from()
method is used to get an Array object from any iterables like array, objects, and strings.
const arr = Array.from( "Sandeep" );
console.log( arr );