Rot13
题目
ROT13 is a simple letter substitution cipher that replaces a letter with the letter 13 letters after it in the alphabet. ROT13 is an example of the Caesar cipher.
Create a function that takes a string and returns the string ciphered with Rot13. If there are numbers or special characters included in the string, they should be returned as they are. Only letters from the latin/english alphabet should be shifted, like in the original Rot13 “implementation”.
分析
.match判断字符是不是字母;
.map用一个函数来处理数组;
对26求余正好是偏移13位后的位置
答案
1 | function rot13(message) { |

