JavaScript valueOf() Method
Complete Boolean Object Reference
Definition and Usage
The valueOf() method returns the primitive value of a Boolean object.
Syntax
Example
In this example we will create a Boolean object and use valueOf() the get the primitive
value of it:
<script type="text/javascript">
var boo = new Boolean(false);
document.write(boo.valueOf());
</script>
|
The output of the code above will be:
Try-It-Yourself Demos
valueOf()
How to use valueOf() find the primitive value of a Boolean object.
Complete Boolean Object Reference
|