NewDash

    Function first

    • Gets the first element of array.

      Type Parameters

      • T

      Parameters

      • array: ArrayLike<T>

        The array to query.

      Returns T

      Returns the first element of array.

      5.5.0

      [[head]]

      first([1, 2, 3]);
      // => 1

      first([]);
      // => undefined
    MMNEPVFCICPMFPCPTTAAATR