Easy Tutorial
❮ Met Tablerow Deletecell Prop Iframe Frameborder ❯

JavaScript toString() Method

JavaScript Boolean Object

Example

Convert a boolean value to a string:

myvar output result:


Definition and Usage

The toString() method converts a logical value to a string and returns the result.

Note: JavaScript automatically calls this method when a Boolean object needs to be converted to a string.


Browser Support

All major browsers support the toString() method.


Syntax

Return Value

Type Description
String "true" or "false"

Technical Details

| JavaScript Version: | 1.1 | | --- | --- |


JavaScript Boolean Object

❮ Met Tablerow Deletecell Prop Iframe Frameborder ❯