The valueOf() method is used to return the primitive value of a Boolean object.
This method has the form:
A Boolean with the value either true or false
The following example shows the basic use of this method.
<script> var bool = new Boolean(0); document.write(bool.valueOf()); </script>
This produces the following result: