This can be a tricky project. I would forget about JavaScript. You can’t solve a problem in code unless you can describe the process for solving the problem.
So if I threw away your computer and handed you a pencil, a sheet of paper, and the coded message "SERR PBQR PNZC", how would you decode this message, step by step? You know that every letter has been swapped out with the letter that is 13 spaces ahead in the alphabet.