function getIntersection(str1, str2) {
const set1 = new Set(str1);
const set2 = new Set(str2);
const intersection = [...set1].filter(char => set2.has(char));
return intersection.join('');
}
module.exports = getIntersection;
const string1 = "csharp";
const string2 = "python";
console.log("Intersection:", getIntersection(string1, string2));
/*
run:
Intersection: hp
*/