例:
let a = [1,2,3];
let b = [2,3,4];
let intersect = a.filter(x => b.includes(x));
=> [2, 3]
let a = [1,2,3];
let b = [2,3,4];
let c = [3,4,5];
let intersect = a.filter(x => b.includes(x)&&c.includes(x));
=> [3]
例:
let a = [1,2,3];
let b = [2,3,4];
let intersect = a.filter(x => b.includes(x));
=> [2, 3]
let a = [1,2,3];
let b = [2,3,4];
let c = [3,4,5];
let intersect = a.filter(x => b.includes(x)&&c.includes(x));
=> [3]