Return the primitive value of a Boolean object:
The result of myvar will be:
The valueOf() method returns the primitive value of a Boolean object.
![]()
The valueOf() method is supported in all major browsers.
| Type | Description |
|---|---|
| Boolean | Either true or false |
JavaScript Boolean Object
Your message has been sent to W3Schools.