String.fromCharCode() (Method/static)

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

Availability:

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:

   <HTML>

   <HEAD>

   </HEAD>

   <BODY>

   <SCRIPT>

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

   </SCRIPT>

   </BODY>

   </HTML>

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()

Cross-references:

ECMA 262 edition 2 - section 15.5.3.2

ECMA 262 edition 3 - section 15.5.3.2