JavaScriptStringcharCodeAt
charAt

charCodeAtString

concat

Returns the UTF-16 code of the character at the specified index.

Syntax

str.charCodeAt(index)

Example

Enter values below to update the example in real time.

const
console
charCodeAt
const text = "ABC";
console.log(text.charCodeAt(0));   // 65
console.log(text.charCodeAt(1));   // 66