js获取两个数组的合集和差集
打印两个数组之间的差集 var a = [110000,150000,310000]; var b = [110000,310000]; var c = []; var tmp = a.concat(b); var o = {}; for (var i = 0; i < tmp.length; i ++) (tmp[i] in o) ? o[tmp[i]] ++ : o[tmp[i]] = 1; for (x in o) if (o[x] == 1) c.push(x); cons