Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Created May 28, 2013 21:13
Show Gist options
  • Save hyonschu/5666187 to your computer and use it in GitHub Desktop.
Save hyonschu/5666187 to your computer and use it in GitHub Desktop.
var alpha = ["A", "b", "c", "d", "E", "f", "g", "h", "I", "j", "k", "l", "m", "n", "O", "p", "q", "r", "s", "t", "U", "v", "w", "x", "y", "z", "A"];
var str = "this is a new string of crap";
var LetterChange = function(str) {
var newStr = str.split("");
for (var i = 0;i<newStr.length;i++) {
var j = 0;
if (newStr[i] == alpha[j]) {
newStr[i] = alpha[j+1]
} else { j++ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment