VOOZH about

URL: https://www.geeksforgeeks.org/javascript/underscore-js-_-toarray-function/

⇱ Underscore.js _.toArray Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Underscore.js _.toArray Function

Last Updated : 27 Dec, 2021
The _.toArray() function is used to create a real array from the list of items or any other data types that iterated over the elements. Syntax:
_.toArray( list )
Parameters: This function accepts single parameter as mentioned above and described below:
  • list: This parameter holds the list of items.
Return Value: It returns an array from the list of items. Example 1: Output: 👁 Image
Example 2:
Output: 👁 Image
Comment