Name

Boolean.toString( ): convert a boolean value to a string — ECMAScript v1: Overrides Object.toString( )

Synopsis

b.toString( )

Returns

The string “true” or “false”, depending on the value of the primitive boolean value or Boolean object b.

Throws

TypeError

If this method is invoked on an object that is not a Boolean.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.