Ceaser Cipher

Adriaan
17.3K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Previous: More Functions Next: More Soon

Now it's time to write a function that will encode a given String value using the caesar Cipher. The function should only needs to work with lowercase letters from a - z and a space character. So your alphabet will be: javascript const alphabet = "abcdefghijklmnopqrstuvwxyz ";

Hint: You can use the toLowerCase() method of the String type to transform your input string to lowercase characters.

The function needs to take 2 parameters. The first parameter should be of type String and hold the value of the phrase you want to encode. The second parameter should be of type Number and hold the value of the key.

Good Luck!

Caesar Cipher Enciding Function
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content