<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
var a=[3 ,-5 ,2 ,8 ,0, 3 ,5 ,-15 ,9 ,100];
var b=[6 ,4, 8, 2,6, -5 ,9 ,0 ,100, 8 ,1];
var arr2=[];
var arr3=[];
var arr=Array.from(new Set(a));
var arr1=Array.from(new Set(b));
for(var i=0;i<arr.length;i++)
{
for(var j=0;j<arr1.length;j++)
{
if(arr[i]===arr1[j])
{
arr2.push(arr[i]);
break;
}
}
}
for(var q=0;q<arr2.length;q++)
{
for(var w=0;w<arr.length;w++)
{
if(arr[w]===arr2[q])
{
arr.splice(w,1);
}
}
}
for(var a=0;a<arr2.length;a++)
{
for(var s=0;s<arr1.length;s++)
{
if(arr1[s]===arr2[a])
{
arr1.splice(s,1);
}
}
}
console.log(arr.concat(arr1));
</script>
</body>
</html>