📅  最后修改于: 2022-03-11 15:03:33.403000             🧑  作者: Mango
// best
function rot13(message) {
var a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var b = "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM";
return message.replace(/[a-z]/gi, (c) => b[a.indexOf(c)]);
}