How to get the char code in Javascript

To get the char code in Javascript you can use the following snippet.

Sample Javascript

"C".charCodeAt(0); // prints 67

Please Share us:
Please rate this snippet

2 thoughts on “How to get the char code in Javascript

Leave a Reply