String.fromCharCode() (Method/static)

A class-based factory method for converting numeric character codes to String objects.


ECMAScript edition - 3
JavaScript - 1.2
JScript - 3.0
Internet Explorer - 4.0
Netscape - 4.0
Netscape Enterprise Server - 3.0
Opera - 3.0
Property/method value type:String primitive
JavaScript syntax:-String.fromCharCode(aChar0, aChar1, aChar2, ...)
Argument list:aCharNa character code value

Constructs a new string from a sequence of Unicode character code point values each passed as a separate argument.

This is a static method. So called because it belongs to the String() constructor and not any of the string objects. This means it is analogous to a class method in other object oriented environments.

Example code:

   document.write(String.fromCharCode(72, 69, 76, 76, 79));

See also:Arithmetic type, Cast operator, Character handling, Character testing, Character-case mapping, File.byteToString(), Java to JavaScript values, Keyboard events, onKeyDown, String.charCodeAt(), String.constructor, ToUint16, Window.atob(), Window.btoa()


ECMA 262 edition 2 - section

ECMA 262 edition 3 - section