Array.from()
method is used to create a new array instance from any iterable value.
Syntax:
Array.from(value, mapFunction)
- object: The value to be converted into an array.
- mapFunction (optional): A mapping function that allows you to modify each element in the array during the creation process.