Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

toString Method (String)

Returns a string representation of a string.



Required. The array to represent as a string.

The string representation of the string.

The following example illustrates the use of the toString method with a string.

var string = "this is a test";
var strStr = string.toString();

// Output: this is a test

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported Store apps (Windows 8 and Windows Phone 8.1). See Version Information.

© 2015 Microsoft