Skip to main content
added 17 characters in body
Source Link
var a= [1, 2,3]; 3, '3']; var b = [1, 2, 3]; var c = a.filter(function (i) { return ! b~b.indexOf(i); }); alert(c.length); 
var a= [1,2,3]; var b = [1,2,3]; var c = a.filter(function (i) { return ! b.indexOf(i); }); alert(c); 
var a= [1, 2, 3, '3']; var b = [1, 2, 3]; var c = a.filter(function (i) { return ! ~b.indexOf(i); }); alert(c.length); 
Source Link

var a= [1,2,3]; var b = [1,2,3]; var c = a.filter(function (i) { return ! b.indexOf(i); }); alert(c);