This is my challenge using JavaScript -> Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.My code works, but I think that it can be better.function diffArray(arr1, arr2) { var newArr = [];  arr1.map(function(val){   arr2.indexOf(val) < 0 ? newArr.push(val) : '';  });  arr2.map(function(val){   arr1.indexOf(val) < 0 ? newArr.push(val) : '';  });  return newArr;}diffArray([1, 2, 3, 5, 6, 7], [1, 2, 3, 4, 5]);What do you think?
Diff Two Arrays - return the symmetric difference of the two arrays
javascript;algorithm;array