String.prototype.charCodeAt() - JavaScript | MDN

charCodeAt() メソッドは、指定された位置にある UTF-16 コード単位を表す 0 から 65535 までの整数を返します。