return symmetric difference of the array javascript
function symmetricDiff(arrary1, array2){
let symmetricDifference = [];
symmetricDifference = array1.filter(element => !array2.includes(element))
.concat(array2.filter(element => !array1.includes(element)))
return symmetricDifference;
}
Also in JavaScript:
- javascript pass by reference
- how to detect a keypress in javascript
- ClassNotFoundException: com.fasterxml.jackson.core.JsonGenerator
- cb=gapi.loaded_0:190 Uncaught TypeError: $.ajax is not a function
- javascript on submit
- how to add up all the numbers in between 0 and that number
- change index array javascript
- jquery dialog button text set by variable
- d3 tree dag
- .join javascript
- redis nodejs
- sum of all elements in array javascript
- js clone element
- change text of paragraph jquery
- update create react app
- chartjs min
- how to delete element in list javascript
- react final form onchange field
- json_decode jquery
- python create json object
- javascript get date without time
- how to floor a number in javascript
- nodejs express hot reload
- javascript for in loop