Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript filter array by another array

arr1 = [1,2,3,4],
arr2 = [2,4],
response = arr1.filter(item => !arr2.includes(item));
 
PREVIOUS NEXT
Tagged: #javascript #filter #array #array
ADD COMMENT
Topic
Name
1+3 =