Created
February 24, 2014 12:40
-
-
Save bradoyler/9187672 to your computer and use it in GitHub Desktop.
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 LetterChanges(str) { | |
var letters = str.split(''); | |
for (var i = 0; i < letters.length; i++) { | |
var letter = letters[i]; | |
if(/[a-yA-Y]/.test(letter)){ | |
letters[i] = String.fromCharCode(letter.charCodeAt(letter.length-1)+1); | |
} | |
} | |
return letters.join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment