It will create a slice of value (array/string) with n elements dropped from the end.
value
n
1.0.0
drop([0, 1, 2, 3, 4, 5], 2);// => [0, 1, 2, 3] Copy
drop([0, 1, 2, 3, 4, 5], 2);// => [0, 1, 2, 3]
drop("012345");// => "01234" Copy
drop("012345");// => "01234"
drop("012345", 2);// => "0123" Copy
drop("012345", 2);// => "0123"
It will create a slice of
value
(array/string) withn
elements dropped from the end.