Tell us what’s happening:
I’ve used the concat method to join both of the arrays. I’m planning on using filter to return true only if the value is unique and return false when the value is duplicated within the array. I can’t seem to figure out how to do that though. any ideas would help.
Your code so far
function diffArray(arr1, arr2) {
var newArr = [];
return arr1.concat(arr2).fiter(value=> )
}
diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays