Boolean.toString() : Boolean « Number Data Type « JavaScript Tutorial






Syntax

boolean.toString()

The toString() method returns the string representation ("true" or "false") of the primitive Boolean value.

If true, the string "true" is returned.

If false, the string "false" is returned.

<html>
    <script language="JavaScript">
    <!--
    boolObj = new Boolean(false);
    if(boolObj.toString() == "false")
      alert("EQUAL");
    else
      alert("NOT Equal");
    -->
    </script>
</html>








5.2.Boolean
5.2.1.Boolean
5.2.2.Boolean Object Verses Primitive Boolean Value
5.2.3.Boolean.prototype
5.2.4.Boolean.toSource()
5.2.5.Boolean.toString()
5.2.6.Boolean.valueOf()