FUNDAMENTALS
Take 2 strings s1 and s2 including only letters from a to z. Return a new sorted string, the longest possible, containing distinct letters - each taken only once - coming from s1 or s2.
Examples:
a = "xyaabbbccccdefww"
b = "xxxxyyyyabklmopq"
longest(a, b) -> "abcdefklmopqwxy"
a = "abcdefghijklmnopqrstuvwxyz"
longest(a, a) -> "abcdefghijklmnopqrstuvwxyz"
const longest = (s1, s2) => {
const stringsConcated = s1 + s2
const stringWithoutRepeatedLetters = new Set(stringsConcated.split(''))
return Array.from(stringWithoutRepeatedLetters).sort().join('')
}