The function sumAscii should take an array of names and calculate each name’s score based on the total of each character’s lowercase ASCII value

The function sumAscii should take an array of names and calculate each name’s score based on the total of each character’s lowercase ASCII value. It should return the name with the highest score. E.g. The name ‘John’ would get the score 431 because ‘j’ has the ASCII code 106, ‘o’ has the ASCII code 111, ‘h’ has the ASCII code 104 and ‘n’ has the ASCII code 110.

function sumAscii(arrayOfNames) {
  function getAsciiScore() {
    let sum = 0;
    let arrayOfAsciiCodes = [];
    for (const name of arrayOfNames) {
      name.split("").forEach((letter) => {
        sum += letter.toLowerCase().charCodeAt(0);
      });
    }
    return sum;
  }

  let highestScore = "";
  for (const name of arrayOfNames) {
    for (const letter of name) {
      return getAsciiScore(letter);
    }
  }
}

My function returns the total Ascii code score of all the names