fromCharCode()
String
class methodS2C Home
« Globals « String « fromCharCode()
Description
Returns a string created from the specified sequence of Unicode values.
- Like all class methods
fromCharCode()
should be used on the class rather than an instance of the class.
Syntax
Signature | Description |
---|---|
String.fromCharCode(unicodeVal1, ..., unicodeValN) | Returns a string created from the specified sequence of Unicode values. |
Parameters
Parameter | Description |
---|---|
unicodeVal1, ..., unicodeValN) | A sequence of Unicode values to form the string from. |
Examples
The code below creates a string from some unicode values.
// Create string variable from unicode values.
var aString = String.fromCharCode(97, 98, 99, 100);
// Display string.
alert('String contains: ' + aString);
Related Tutorials
JavaScript Basic Tutorials - Lesson 8 - Strings