JavaScript Caesars Cipher

Requirements

Implementation

rot13(str) decodes a ROT13 cipher encoded string. str is the ROT13 cipher encoded string. Returns the decoded string.

Example Usage

Use the browser console to interact with the function (Ctrl + Shift + I, then select the "Console" tab):

> rot13("LBH QVQ VG!"); // YOU DID IT!
> rot13("SERR PBQR PNZC"); // FREE CODE CAMP
> rot13("SERR CVMMN!"); // FREE PIZZA!
> rot13("SERR YBIR?"); // FREE LOVE?