//Set And Map
const a = [4 , 5, 8, 9]
const b = [3, 4, 5, 7]
const countries = ['Finland', 'Sweden', 'Norway']
//10.2.1--Find a union b
const c=[...a,...b];
let C=new Set(c);
console.log("a union b :",C);
//10.2.2--Find a intersection b
const B=new Set(b);
//console.log(B)
let aUnionb=new Set();
aUnionb=a.filter((value)=>B.has(value));
let aIntersectionb=new Set(aUnionb);
console.log("a intersection b:",aIntersectionb);
//10.2.3--Find a with b
const aWithb=a.filter((value)=>!B.has(value))
const AWithB=new Set(aWithb)
console.log("a with b",AWithB)