one()

Returns one, arbitrary value from this collection, or undefined if there are none.

On collections

Usage

  • one()

Related

  • only()

    Returns the only value in this collection, or undefined if there is more than one value, or if there are no values in the collection.

  • peek()

    Returns the value at the beginning of a collection, the value that would be returned by shift().