var id = ['a','b','c','a','d','a','a','b','d','c','a','b','c','a','b','c'] var del = ['a','c']; var temp01 = []; var temp02 = []; for(var i in del){ temp01[del[i]] = true; } for (var k in id){ if(!temp01[id[k]]){ temp02.push(id[k]) } } console.log(te…