Return the primitive value of a Boolean object:
The result of x will be:
The valueOf() method returns the primitive value of a boolean.
Note: This method is usually called automatically by JavaScript behind the scenes, and not explicitly in code.
Method | |||||
---|---|---|---|---|---|
valueOf() | Yes | Yes | Yes | Yes | Yes |
None |
Return Value: | A Boolean, either "true" or "false" |
---|---|
JavaScript Version: | 1.1 |