toString()
String
instance method getterS2C Home
« Globals « String « toString()
Description
Returns a string of the specified object.
This method overrides the toString()
method of Object
.
Syntax
Signature | Description |
---|---|
aString.toString() | Returns a string of the specified object. |
Parameters
None.
Examples
The code below creates a string and displays it.
// Create a String object.
someString = new String("Learn Javascript");
alert(someString.toString());
Related Tutorials
JavaScript Basic Tutorials - Lesson 8 - Strings