Shift Cypher

Hello, I am trying to do Shift Cypher in the exercise at the bottom of the page here Practice JavaScript Syntax: Classes | Codecademy

My only question for this is, in the solution, how did they come up with these numbers (90,65,122,97) in the for loops ? I tried looking at the link provided for unicodes and am unable to find info leading me to the answer there.

here is the code in question, followed by the full code:

// encrypt for loop
      if (charNum <= 90 && charNum >= 65) {
        charNum += this.shift;
        if (charNum > 90)

// decrypt for loop
 if (charNum <= 122 && charNum >= 97) {
        charNum -= this.shift;
         if (charNum > 97) 
// Full Code
class ShiftCipher {
  constructor(shift){
    this.shift = shift;
  }
  encrypt(plainString) {
    let encryptString = '';
    const tempString = plainString.toUpperCase();

    for (let i=0; i < tempString.length; i++) {
      let charNum = tempString.charCodeAt(i);
      
      if (charNum <= 90 && charNum >= 65) {
        charNum += this.shift;
        if (charNum > 90) {
          charNum -= 26;
        }
      }
      encryptString += String.fromCharCode(charNum);
    }
    return encryptString;
  }
  
  decrypt(encryptString){
    let decryptString = ''
    const tempStr = encryptString.toLowerCase();
    for (let i = 0; i < tempStr.length; i++){
     const charNum = tempStr.charCodeAt(i);
        if (charNum <= 122 && charNum >= 97) {
        charNum -= this.shift;
         if (charNum > 97) {
          charNum += 26;
         }
    }
    }
  }
}

const cipher = new ShiftCipher(2);
cipher.encrypt('I love to code!');

On the provided page link, go to the section headline “Basic latin”. See the table below: There is a red marked passage labelled “Latin Alphabet: Uppercase”. It starts with “A” in the column “Glyph”. In the column “Decimal” right next to it, it says “65”. “Z” equals “90” in that list. 122 = z, 97 = a.

I ran your code: The encrypt method works fine, the decrypt method doesn’t.

ah thank you very much. I couldn’t figure out which table they were using.