toArray()

Returns an array of each value in this collection.

For a map, this operation is equivalent to calling values(). For an array, this is equivalent to calling slice().

On collections

Usage

  • toArray()

Related

  • toObject()

    Returns an object with each property name and value corresponding to the entries in this collection.