How do you convert character to ASCII code

Posted by Jennifer | Updated on

You can use the String.prototype.charCodeAt() method to convert string characters to ASCII numbers. For example, let’s find ASCII code for the first letter of ‘ABC’ string,

Whereas String.fromCharCode() method converts numbers to equal ASCII characters.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers