Caesars Cipher not working

Tell us what’s happening:

My code is not working please tell me whats wrong ?

Your code so far

function rot13(str) { // LBH QVQ VG
  var a=[];
  for(i=0;i<str.length;i++){
    if(str.charCodeAt(i) < 65 || str.charCodeAt(i) > 90)
      return a.push(str.charCodeAt[i]);
    
    else if(str.charCodeAt(i)>77)
      return a.push(String.fromCharCode(str.charCodeAt(i)-13));
    
  else 
  return a.push(String.fromCharCode(str.charCodeAt(i)+13));

  }
  return a.join("");
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.

Link to the challenge:

Not sure if you’re still working on this, but if you are, take a look at where your return statements are.

thank you very much, i completed the code after i had posted it. I had intended to remove it but i forgot, anyways Thank you very much for going through it :smiley: i really appreciate your efforts.
Cheers have a great day.
Thanks.