문제 링크 : Find the Difference
/**
* @param {string} s
* @param {string} t
* @return {character}
*/
var findTheDifference = function(s, t) {
let sArr = new Array(26).fill(0)
let tArr = new Array(26).fill(0)
s.split('').forEach( e => {
sArr[e.charCodeAt(0) - 97] += 1
})
t.split('').forEach( e => {
tArr[e.charCodeAt(0) - 97] += 1
})
let result = ''
sArr.forEach( (e, i) => {
if( e !== tArr[i]) result = String.fromCharCode([i+97])
})
return result
};