Lodash _.drop() Method
The Lodash.drop() method is used to drop the elements in a given array.
- Array: It is the original array from which the elements are to be removed.
- Number: It is the number of elements to be removed from the array.
Note: The elements are removed from the index 0 of the array.
Return Value: It returns the sliced array.
Example 2: If elements to be removed from the right side of the array we use _.dropRight() function.
Example 3: If number greater then the size of array is given then it returns the empty array as given in the below given example.
My Personal Notes arrow_drop_up
Please Login to comment...