by @codeexamples

How to convert ascii code to character Javascript?

Home » javascript » How to convert ascii code to character Javascript?

To convert a ascii code to character we need to use String.fromCharCode() method in JavaScript.

Here is an example:

const character = String.fromCharCode(67);

console.log(character); // "C"

If you have more than one ASCII code you can pass it like this.

const characters = String.fromCharCode(67,79,68,69);

console.log(characters); // "CODE"