Created
March 27, 2016 11:23
-
-
Save samkahchiin/2a30537a51c3d78fcd4f to your computer and use it in GitHub Desktop.
freecodecamp : Missing Letters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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