Skip to content

Instantly share code, notes, and snippets.

@samkahchiin
Created March 27, 2016 11:23
Show Gist options
  • Save samkahchiin/2a30537a51c3d78fcd4f to your computer and use it in GitHub Desktop.
Save samkahchiin/2a30537a51c3d78fcd4f to your computer and use it in GitHub Desktop.
freecodecamp : Missing Letters
function fearNotLetter(str) {
var charCode = String.charCodeAt(str[0]);
for(var i = 1; i < str.length; i++){
charCode++;
if(str[i] != String.fromCharCode(charCode).toLowerCase()){
return String.fromCharCode(charCode);
}
}
}
fearNotLetter("abce");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment