var arr1 = ['1', '2', '3', '4', '3']var arr2 = ['1', '3']var arr3 = arr1.filter(el => !arr2.includes(el))console.log(arr3)
includes 是 es 6 的,也可以用下面的,箭头函数es6的,不行你就转成普通函数:
var arr3 = arr1.filter(el => !~arr2.indexOf(el))