Javascript Caesar Cipher

I was looking through Reddit and Github to try and find inspiration for things to code when I stumbled upon this list of things to program. The Caesar Cipher stood out to me, as it seemed like a fun way to practice manipulating content with javascript.

Caesar Ciphers

If you haven’t heard of a Caesar Cipher, don’t worry; I had no clue what it was until I found this page. Basically, you provide a key (1-25) which represents how many characters in the alphabet to shift each letter in the message.

For example, HELLO with a key of 4 would be encoded as LIPPS

Below is my take on encoding and decoding a Caesar Cipher. It turned out to be a fun little project manipulating input, comparing arrays, handling case sensitivity, and putting it all back together.

See the Pen Caesar Cipher by Miles Wilhelm (@mileswilhelm) on CodePen.

Written on June 1, 2018