JavaScript Boolean valueOf() Method

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

Try it yourself

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

Related Pages

Tutorial:JavaScript Boolean

Tutorial:JavaScript Data Types