Tell us what’s happening:
I am stuck trying to figure out what’s the range of alphabet characters add as a condition in the if statement. Is there any link to a website website where I could find all characters along with their respective codes, I get the concept of charCodeAt on the MDN documentation but I there is reference to the characters.
Your code so far
function rot13(str) {
const newArr = str.split(' ')
var ch = ""
for (let i = 0; i > newArr.lenght; i++) {
var ch = newArr[i].charCodeAt()
if (// between alphabet characters// )
console.log(ch)
}
console.log(newArr)
return str;
}
var text = "a"
let code = text.charCodeAt(0)
console.log(code)
rot13("SERR PBQR PNZC");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
Challenge: JavaScript Algorithms and Data Structures Projects - Caesars Cipher
Link to the challenge: