-
Project Aim: Write a function which takes a ROT13 encoded string as input and returns a decoded strin.
-
Condition: All letters will be uppercase.
-
Condition: Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.
Solution Process:
-
use charCodeAt() to get code UTF code of a character
-
Add 13 to get ROT13 value of character if within alphbet range(65 <-> 91)
-
Get character from code usung String.fromCharcode().
-
Concatenate characters into a string.