![]() |
VOOZH | about |
Lodash _.drop() method is used to drop the elements in a given array.
_.drop(array, number);Note: The elements are removed from the index 0 of the array.
Example 1: In this example, we are dropping 2 elements of an array and printing the rest of the elements by the use of the _.drop() method.
Output:
👁 ImageExample 2: In this example, we are dropping 10 elements of an array and the number od dropping elements is higher than it's length so it will print the empty array.