Created
March 6, 2017 04:19
-
-
Save Underdoge/fff58bed401cecb21a26485139a23806 to your computer and use it in GitHub Desktop.
alphabeticShift
This file contains hidden or 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 alphabeticShift(inputString) { | |
var shift=inputString.split(""); | |
var shifted=shift.map((curr)=>{ | |
if (curr=='z') | |
return 'a'; | |
else | |
return String.fromCharCode(curr.charCodeAt(0)+1); | |
}) | |
return shifted.join(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment