The fromCharCode() method converts Unicode values into characters.
The fromCharCode() method converts Unicode values into characters.
This is a static method, and you can use it as String.fromCharCode().
String.fromCharCode(n1,n2, ...,nX)
Parameter | Require | Description |
---|---|---|
n1, n2, ..., nX | Required. | One or more Unicode values to be converted |
A String, representing the character(s) representing the specified unicode number(s)
Convert a Unicode number into a character:
//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);