NewDash

    Function drop

    • Creates a slice of array with n elements dropped from the beginning.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The array to query.

      • n: number = 1

        The number of elements to drop.

      Returns T[]

      Returns the slice of array.

      5.16.0

      drop([1, 2, 3])
      // => [2, 3]

      drop([1, 2, 3], 2)
      // => [3]

      drop([1, 2, 3], 5)
      // => []

      drop([1, 2, 3], 0)
      // => [1, 2, 3]
    MMNEPVFCICPMFPCPTTAAATR