Hello everyone. This is my code for the Symmetric Difference challenge. I have been working on it for quite some time now and have come up with some slightly cluttered code. I’m not sure whether I have a logic error, or some sort of bug. Can someone please help me with this?

```
`function sym(args) {
var arr = [...arguments];
var result = [];
function diffFirstTwo(arr1, arr2) {
for(var i in arr2) {
if(arr1.includes(arr2[i]) != true && result.includes(arr2[i]) != true) {
result.push(arr2[i]);
} else {
continue;
}
}
for(var j in arr1) {
if(arr2.includes(arr1[j]) != true && result.includes(arr1[j]) != true) {
result.push(arr1[j]);
} else {
continue;
}
}
}
function diffTheRest(arr) {
for(var i in arr) {
if(result.includes(arr[i]) != true) {
result.push(arr[i]);
} else {
var value = arr[i];
for(var j in result) {
if(result[j] === value) {
delete result[j];
j++;
}
}
}
}
}
if(arr.length === 2) {
diffFirstTwo(arr[0], arr[1]);
} else {
diffFirstTwo(arr[0], arr[1]);
for(var i = 2; i < arr.length; i++) {
diffTheRest(arr[i]);
}
}
result = result.filter(function(element) {
return element !== undefined && element !== null;
});
result = result.sort(function(a, b){
return a - b;
});
return result;
}
sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]); `
```