Hello, i just completed the caesar cipher challenge and i want to get feedback.
here is my code.
`
function rot13(str) { // LBH QVQ VG!
var strArr = [];
for (var i = 0; i < str.length; i++){
if (/[a-z]/gi.test(str[i])){
var charCode = str.charCodeAt(i) + 13;
if (charCode > 90 || charCode < 65){
charCode -= 26;
}
strArr.push(String.fromCharCode(charCode));
}
else {
strArr.push(str[i]);
}
}
str = strArr.join('');
return str;
}
rot13("SERR CVMMN!");
`