Challenge Caesars Cipher has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
functionrot13(str) { // LBH QVQ VG!var resStr ="";
var tmp;
for(var i =0; i <str.length; i++) {
tmp =str.charCodeAt(i);
if (tmp >=65&& tmp <=90) {
if(tmp <=77) {
resStr +=String.fromCharCode(tmp +13);
} else {
resStr +=String.fromCharCode(tmp -13);
}
} else {
resStr +=str.charAt(i);
}
}
return resStr;
}
// Change the inputs below to testrot13("SERR YBIR?");
Challenge Caesars Cipher has an issue.
User Agent is:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
.Please describe how to reproduce this issue, and include links to screenshots if possible.
My code: