English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
toString()The method returns a string representing the specified Boolean object.
When a boolean value is represented as a text value or referenced in a string concatenation, JavaScript automatically callstoString()Method.
boolean.toString()
var bool = true; bool.toString();Test and See‹/›
All browsers fully support the toString() method:
Method | |||||
toString() | is | is | is | is | is |
Return Value: | represents the string for the specified Boolean object ("true"or"false") |
---|---|
JavaScript Version: | ECMAScript 1 |