Convert a Boolean value to a string:
The result of x will be:
The toString() method returns a boolean value as a string.
Note: This method is called by JavaScript automatically whenever a boolean is used in a string operation.
Method | |||||
---|---|---|---|---|---|
toString() | Yes | Yes | Yes | Yes | Yes |
None. |
Return Value: | A String, either "true" or "false" |
---|---|
JavaScript Version: | 1.1 |