Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Common Words by Moff
function commonWords(first, second) {
let a1 = first.split(','), a2 = second.split(',');
let result = [];
for (let w of a1) {
if (a2.indexOf(w) > -1)
result.push(w);
}
result.sort();
return result.join(',');
}
July 6, 2017
Comments: