Skip to content

Instantly share code, notes, and snippets.

@RahmatSaeedi
Created May 10, 2021 14:32
Show Gist options
  • Save RahmatSaeedi/3196321ea338bfc0a2d70e3005600c23 to your computer and use it in GitHub Desktop.
Save RahmatSaeedi/3196321ea338bfc0a2d70e3005600c23 to your computer and use it in GitHub Desktop.
CodeSignal - Arcade - Intro - JS - alphabeticShift
function alphabeticShift(inputString) {
return inputString.split("").map( c => {
if(c == 'z')
c = 'a';
else
c = String.fromCharCode(c.charCodeAt(0) + 1);
return c;
}).join("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment