**Tell us what’s happening:**

I’m supposed to find symmetric difference between 2 or more sets.

When given [1, 2, 5], [2, 3, 5], and [3, 4, 5], I think the answer should be [1, 4], but the test says I should return [1, 4, 5].

Maybe I don’t understand symmetric difference, but with 3 sets, if a value is in all three, shouldn’t it be excluded from the result? So why is 5 included?

**Your code so far**

```
function sym(...args) {
const numArrays = args.length;
let result = [];
for (let i = 0; i < numArrays; i++) {
for (let j = 0; j < args[i].length; j++) {
let currentValue = args[i][j];
let seen = 0;
for (let k = 0; k < numArrays; k++) {
if (args[k].includes(currentValue)) {
seen++;
}
}
if (seen == 1 && !result.includes(currentValue)) {
result.push(currentValue);
}
}
}
return result;
}
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/coding-interview-prep/algorithms/find-the-symmetric-difference/