Good day. I have two arrays, for example var arr = [1,2,3]; and var x = [1,2,3,4,5]; . And there is a script that removes the same elements of the array.
for(var i=0;i<x.length;i++){ for(var j=0;j<arr.length;j++){ if(x[i]==arr[j]){ x.splice(i,1); } } } But the problem is that if you mix the elements of an array, for example, var arr = [1, 3, 2]; and var x = [5,3,1,2,4] , then as a result there may be elements that are repeated.
xindices of all elements that do not repeat with the elementsarr- ItsMyLife