JavaScript Boolean valueOf() Method
- Previous Page toString()
- Next Page constructor
- Go to the Previous Level JavaScript Boolean Reference Manual
Definition and usage
valueOf()
The method returns the original value of the boolean value.
valueOf()
Usually called by JavaScript in the background, rather than explicitly called in the code.
Example
Returns the original value of the Boolean object:
let bool = false; bool.valueOf() // Returns false
Syntax
boolean.valueOf()
Parameter
No parameters.
Technical details
Return value: | Boolean values, true or false. |
---|---|
JavaScript version: | ECMAScript 1 |
Browser support
All browsers fully support Boolean.valueOf()
Method:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Previous Page toString()
- Next Page constructor
- Go to the Previous Level JavaScript Boolean Reference Manual