Created
April 14, 2018 23:07
-
-
Save ywh233/472986f835c7fe270ce8554819520c98 to your computer and use it in GitHub Desktop.
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 transpose(str, offset) { | |
let nstr = ''; | |
for (var i = 0; i < str.length; i++) { | |
const cc = str.charCodeAt(i); | |
nstr += String.fromCharCode(cc + offset); | |
} | |
return nstr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment