Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
from ZoltanOnody solution in Clear category for [old] Common Words by oduvan
"use strict";
const intersection = (set1, set2) => {
return [...set1].filter(x => set2.has(x));
}
function commonWords(first, second) {
let array = intersection(
new Set(first.split(',')),
new Set(second.split(','))
);
return array.sort().join(',');
}
Oct. 9, 2016
Comments: