DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
compare two arrays and return the difference javascript
let difference = arr1 .filter(x => !arr2.includes(x)) .concat(arr2.filter(x => !arr1.includes(x)));
Source by techiedelight.com #
PREVIOUS
NEXT
Tagged:
#compare
#arrays
#return
#difference
#javascript
ADD COMMENT
Topic
COMMENT
Name
3+6 =
Submit