how can i convert ascii code to character in javascript
charCodeAt() Function to Convert Character to ASCII in JavaScript. The charCodeAt() function defined on string prototype returns the Unicode value i.e. UTF-16 code at the specified index. It returns a value in the range 0 to 216 - 1 i.e. 65535 . The codes 0 to 127 in UTF codes are same as the ASCII code.
To convert ASCII to string, use the toString() method. Using this method will return the associated character.
String.fromCharCode(ascii_code)
If you want to convert Ascii Codes to Characters you can use:
String.fromCharCode(codes);
For Example:
String.fromCharCode(65,66,67); which returns = "ABC"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With