I am trying to solve the following issue:
Find the missing letter in the passed letter range and return it. If all letters are present in the range, return undefine
This is an even shorter answer thanks to RegExp() that allows you to create a Regular Expression on the fly and use match() to strip off the given letters from a generated String that has all the letters in the given range:
function fearNotLetter(str) {
var allChars = '';
var notChars = new RegExp('[^'+str+']','g');
for (var i=0;allChars[allChars.length-1] !== str[str.length-1] ;i++)
allChars += String.fromCharCode(str[0].charCodeAt(0)+i);
return allChars.match(notChars) ? allChars.match(notChars).join('') : undefined;
}