find unique values between multiple array
var array3 = array1.filter(function(obj) { return array2.indexOf(obj) == -1; });
find unique values between multiple array
var array3 = array1.filter(function(obj) { return array2.indexOf(obj) == -1; });
return uncommon from two arrays js
let array = [1,2,3,4,5,6,78,9];
function except(array,excluded){
let newArr,temp,temp1;
check1=array.filter(function(value)
{
return excluded.indexOf(value) == -1;
});
check2=excluded.filter(function(value)
{
return array.indexOf(value) == -1;
});
output=check1.concat(check2);
return output;
}
except(array,[1,2])
//so the output would be => [ 3, 4, 5, 6, 78, 9 ]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us