📜  charcodeAt javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:53.993000             🧑  作者: Mango

代码示例6
const sentence = 'The quick brown fox jumps over the lazy dog.';

const index = 4;
// return the chartcode of the character with index N°4
const charcode= sentence.charCodeAt(index);
console.log (charcode);  
// expected output: "The character code 113 is equal to q"

// remember that charCodeAt return the code on ♦ keypress event ♦