Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created February 24, 2014 12:40
Show Gist options
  • Save bradoyler/9187672 to your computer and use it in GitHub Desktop.
Save bradoyler/9187672 to your computer and use it in GitHub Desktop.
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