JavaScript - Boolean valueOf() Method



Description

JavaScript boolean valueOf() method returns the primitive value of the specified boolean object.

Syntax

Its syntax is as follows −

boolean.valueOf()

Return Value

Returns the primitive value of the specified boolean object.

Example

Try the following example.


   
      JavaScript valueOf() Method
   
   
      
            
   

Output

flag.valueOf is : false 
javascript_boolean_object.htm
Advertisements