JavaScript » String » fromCharCode

Syntax:
String.fromCharCode(num1,...,numN)

This method takes the specified Unicode values and returns a string (but not a String object).

Note that this method is a static method of String. Therefore, it is not used as a method of a String object that you have created. The syntax is always String.fromCharCode() as opposed to myStringObject.fromCharCode().

Examples

Code:
document.write (String.fromCharCode(67,65,66))
Output:
CAB
Explanation:

This code takes the specified Unicode values and writes the resulting string to the document.

See Also: