![]() |
VOOZH | about |
Lodash _.pullAll() method is used to remove all the values from the first given array that are given in the second array.
_.pullAll(array, values);Example 1: In this example, it removes the second array of elements from the first array and returns the remaining elements.
Output:
[ 2, 4, 5 ]Example 2: In this example, it removes the second array of elements from the first array and returns the remaining elements.
Output:
[ 2, 3, 3 ]Example 3: In this example, it removes the second array elements from the first array and returns the remaining elements.
Output:
[ 'a', 'd' ]Note: This will not work in normal JavaScript because it requires the library lodash to be installed.