dcsimg

How do you find the ASCII value of a character in JavaScript?

Luigi Viggiano

You can use the charCodeAt(int) method of String objects to get the character code of a specific char in a string.

Example:

  var anyString = 'hello';
  anyString.charCodeAt(1);