JAVASCRIPT BOOLEAN

Lavanya



JavaScript Boolean 


The JavaScript Boolean object represents a value in one of two states: true or false. You can create it using the Boolean() constructor, as shown below.

Syntax 


let boolObj = new Boolean(value);


The default value of a JavaScript Boolean object is `false`.


JavaScript Boolean Example 


<Script>

let boolObj = new Boolean();

console.log(boolObj.valueOf());

</Script>


 outputs:

 false

JavaScript Boolean Properties




JavaScript Boolean Methods 








Tags
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send