function rot13(str) {
conv=[];
for (i=0;i<=str.length-1;i++){
if (str.charCodeAt(i)>=65 && str.charCodeAt(i)<=77){
conv[i] = String.fromCharCode(str.charCodeAt(i)+13);
}else if (str.CharCodeAt(i)>=78 && str.CharCodeAt(i)<=90){
conv[i] = String.fromCharCode(str.charCodeAt(i)-26);
}
else{
conv[i] = str[i];
}
}
conv = conv.join("");
return conv;
}
When I used “||” in the conditions I got incorrect results and no errors. When I changed it to “&&” I got this error: str.CharCodeAt is not a function. How is this possible