JavaScript Objects The Boolean Object- toString() - Javascript Objects

What is JavaScript - Boolean toString() Method?

The JavaScript-Boolean toString() method returns a string of either "true" or "false" based upon the value of the object.

Syntax:

Its syntax is shown below −

Return Value:

It returns a string representing the given Boolean object.

Example:

Try the below example.

Output:

flag.toString is : false


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics