Converts a character to its CharCode
If string contains multiple characters only the first one is converted
Returns CharCode of 'A'
const cc = charCodeOf('A');console.log(cc); // 65
Returns NaN for empty String
NaN
String
const cc = charCodeOf('');console.log(cc); // NaN
the CharChode of the character, or NaN if there is no character
Generated using TypeDoc
Converts a character to its CharCode
If string contains multiple characters only the first one is converted
Example
Returns CharCode of 'A'
Example
Returns
NaNfor emptyStringReturns
the CharChode of the character, or
NaNif there is no character