Creates a slice of an array with n elements dropped from the end.
n
The array to process.
The number of elements to drop from the end. Defaults to 1.
1
A new array excluding the dropped elements from the end.
dropRight([1, 2, 3, 4], 2);// → [1, 2]dropRight([1, 2, 3]);// → [1, 2] Copy
dropRight([1, 2, 3, 4], 2);// → [1, 2]dropRight([1, 2, 3]);// → [1, 2]
1.0.0
Creates a slice of an array with
n
elements dropped from the end.