JavaScript fromCharCode() Method
Example
Convert a Unicode encoding into a character:
var n = String.fromCharCode(65);
n Output result:
A
Try it »
Definition and Usage
fromCharCode() accepts a specified Unicode value and returns a string.
**Note:** This is a static method of String. Each character in the string is specified by a separate Unicode numeric encoding. Syntax: String.fromCharCode().
Browser support





The fromCharCode() method is supported by all major browsers
Syntax
String.fromCharCode(
n1
,
n2
, ...,
nX
)
Parameter value
| Parameters | Description |
|---|---|
| n1, n2, ..., nX | Required. One or more Unicode values, i.e. the Unicode encodings of the characters to be created in the string. |
Return Value
| Type | Description |
|---|---|
| String | Returns the character representing the Unicode encoding. |
Technical Details
| JavaScript version: | 1.2 |
|---|
More examples
Example
Convert a Unicode encoding into a string:
var n = String.fromCharCode(72,69,76,76,79);
n Output result:
HELLO
Try it »
JavaScript String object