Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find symmetrical difference of arrays

let difference = arrA
                 .filter(x => !arrB.includes(x))
                 .concat(arrB.filter(x => !arrA.includes(x)));
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #find #symmetrical #difference #arrays
ADD COMMENT
Topic
Name
3+5 =