Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
toString Method (Boolean)

toString Method (Boolean)


Returns a string representation of an object.



Required. An object for which to get a string representation.

If the Boolean value is true, returns "true". Otherwise, returns "false".

The following example illustrates the use of the toString method.

var s = new Boolean(0);

// Output: false;


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