Получить код символа в строке

const sentence = 'Hello, World!';

const index = 0;

console.log(`The character code ${sentence.charCodeAt(index)} is equal to ${sentence.charAt(index)}`);
Whale