Skip to content

Instantly share code, notes, and snippets.

@MartinMuzatko
Created April 12, 2017 14:05
Show Gist options
  • Save MartinMuzatko/da379bea628304a1b3c02ffec93a7110 to your computer and use it in GitHub Desktop.
Save MartinMuzatko/da379bea628304a1b3c02ffec93a7110 to your computer and use it in GitHub Desktop.
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