From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript valueOf() Method


Boolean Object Reference JavaScript Boolean Object

Definition and Usage

The valueOf() method returns the primitive value of a Boolean object.

Syntax

booleanObject.valueOf()


Example

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:

false

Try it yourself »


Boolean Object Reference JavaScript Boolean Object

From http://www.w3schools.com (Copyright Refsnes Data)