Skip to content

Instantly share code, notes, and snippets.

@boscomonkey
Last active August 29, 2015 14:19
Show Gist options
  • Save boscomonkey/0e63f4b17dba6b4b6cd4 to your computer and use it in GitHub Desktop.
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
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