문제 링크 : Odd String Difference
/**
* @param {string[]} words
* @return {string}
*/
var oddString = function(words) {
let wordsMap = {}
for(word of words) {
let temp = ''
for(let i =0;i<word.length-1;i++){
temp+=word[i+1].charCodeAt(0)-word[i].charCodeAt(0)+'_';
}
wordsMap[temp] = wordsMap[temp] ? [...wordsMap[temp], word] : [word]
}
for(val of [...Object.values(wordsMap)]) {
if(val.length === 1) return val[0]
}
};