I'm trying to recreate a text converter ultimately simular to rot13.com. However I don't know how to make it convert specific characters to another character. If I wanted to input;
example
Then I would want the output to be
rcszqar
Some more;
abc > snv
foo > gpp
bar > nst
I'm using return String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + i) ? c : c - 26);
But no matter what numbers I change in that line, none of them are replaced correctly.