Description
The valueOf() method is used to return the primitive value of a Boolean object.
This method has the form:
boolean.valueOf()
Note: This method is usually called automatically by JavaScript and not meant to be called explicitly in code.
Return Value
A Boolean with the value either true or false
Examples
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:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|