Boolean.toString() : Boolean : Number Data Type JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Number Data Type » Boolean »

 

Boolean.toString()











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>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Number Data Type
» Boolean