String.fromCharCode()
The static String.fromCharCode()
method returns a string created by using the specified sequence of Unicode values.
Syntax
String.fromCharCode(num1[, ...[, numN]])
Parameters
num1, ..., numN
A sequence of numbers that are Unicode values.
Description
This method returns a string and not a String object.
Because fromCharCode()
is a static method of String, you always use it as String.fromCharCode()
, rather than as a method of a String object you created.
Examples
String.fromCharCode(65, 66, 67); // "ABC"
var test = String.fromCharCode(112, 108, 97, 105, 110);
document.write(test);
// Output: plain