Skip to content

Project Caesars Cipher from FreeCodeCamp JavaScript Algorithms and Data Structures

Notifications You must be signed in to change notification settings

hahn-th/fcc-caesars-cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

fcc-caesars-cipher

Project "Palindrome Checker" from FreeCodeCamp JavaScript Algorithm and Data Structures Certification URL: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher

Caesars Cipher

One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount.

A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus A ↔ N, B ↔ O and so on.

Write a function which takes a ROT13 encoded string as input and returns a decoded string.

All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.

testcases from project description

  • rot13("SERR PBQR PNZC") should decode to the string FREE CODE CAMP
  • rot13("SERR CVMMN!") should decode to the string FREE PIZZA!
  • rot13("SERR YBIR?") should decode to the string FREE LOVE?
  • rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.") should decode to the string THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.

About

Project Caesars Cipher from FreeCodeCamp JavaScript Algorithms and Data Structures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published