Tell us what’s happening:
Hello fellow campers!
I looked up for the solution to this exercise but I am unable to understand the syntax of this solution.
Precisely this part ----------- !arr1.includes(item) || !arr2.includes(item)
Can someone please explain the meaning of ! in “!arr1”.
Thank you.
Your code so far
function diffArray(arr1, arr2) {
return arr1
.concat(arr2)
.filter(
item => !arr1.includes(item) || !arr2.includes(item)
)
}
console.log(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/76.0.3809.100 Safari/537.36`.
**Link to the challenge:**
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays