Created
April 12, 2017 14:05
-
-
Save MartinMuzatko/da379bea628304a1b3c02ffec93a7110 to your computer and use it in GitHub Desktop.
This file contains 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 rot(text, amount=13) { | |
return text.split('').map(letter=>{return String.fromCharCode(((letter.charCodeAt(0)-97+amount) % 25) + 97)}).join('') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment