Last active
August 29, 2015 14:19
-
-
Save boscomonkey/0e63f4b17dba6b4b6cd4 to your computer and use it in GitHub Desktop.
Using JavaScript Array.prototype.map for http://pastie.org/pastes/10094244/text?key=rxbt7tdkh0yyrngilvraw
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 getString(str, offset) { | |
return str.split('') | |
.map(function(ch) { | |
return String.fromCharCode(ch.charCodeAt(0) + offset); | |
}) | |
.join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment