简单数组 如果数组中仅是字符串和数值 es5 var a = [1,2,3], b = [2,3,4,5]; // 交集---[2,3] var intersection = a.filter(item => b.indexOf(item) > -1) // 并集---[1,2,3,4,5] var union= a.concat(b.filter(item => a.indexOf(item) === -1)