English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript Boolean toString() Method

 JavaScript Boolean Object

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.

Syntax:

boolean.toString()
var bool = true;
bool.toString();
Test and See‹/›

Browser Compatibility

All browsers fully support the toString() method:

Method
toString()isisisisis

Technical Details

Return Value:represents the string for the specified Boolean object ("true"or"false")
JavaScript Version:ECMAScript 1

 JavaScript Boolean Object