Returns a new container skipping the first n elements of the input, preserving the original container type.
n
Negative n is treated as 0.
0
drop([1, 2, 3, 4], 2) // [3, 4]drop(new Set([1, 2, 3]), 1) // Set { 2, 3 } Copy
drop([1, 2, 3, 4], 2) // [3, 4]drop(new Set([1, 2, 3]), 1) // Set { 2, 3 }
Returns a new container skipping the first
nelements of the input, preserving the original container type.Negative
nis treated as0.