drop(_ n: Int = 1) -> [Int]

Creates a new sliced array with n elements dropped from the beginning.

Parameters

  • n: The number of elements to drop. default to 1.

Returns

Returns the new sliced array.

[1,2,3,4,5].drop()
// -> [2,3,4,5]
[1,2,3,4,5].drop(2)
// -> [3,4,5]