Javascript - String fromCharCode() Method

The fromCharCode() method converts Unicode values into characters.

Description

The fromCharCode() method converts Unicode values into characters.

This is a static method, and you can use it as String.fromCharCode().

Syntax

String.fromCharCode(n1,n2, ...,nX)

Parameter Values

Parameter Require Description
n1, n2, ..., nX Required. One or more Unicode values to be converted

Return

A String, representing the character(s) representing the specified unicode number(s)

Convert a Unicode number into a character:

Demo

//display the character of the specified unicode number.
var res = String.fromCharCode(65);
console.log(res);//ww w  .  j  a v a 2 s.  c  o m
//display characters of the specified unicode numbers.
res = String.fromCharCode(72, 69, 76, 76, 79);
console.log(res);

Result