📜  如何比较两个数组并返回缺失值 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:22.184000             🧑  作者: Mango

代码示例1
var a1 = [1,2,3,4,5,6];
var a2 = [1,3,5];

var absent = a1.filter(e=>!a2.includes(e));

console.log(absent);