JavaScript: Get ASCII value of character, convert ASCII to character
How to get the ASCII value of a character#
To get the ASCII value of a character, use the charCodeAt
instance method of the String
JavaScript object. Example:
To convert a string of characters to ASCII values, you can do something like this:
To convert an ASCII value to its corresponding character use the fromCharCode
static method of the String
JavaScript object. Example: