In JavaScripp Boolean objec is used to represents value in two states: true or false. In this tutorial Boolean method is explained.
Example of Boolean
In this example comparison is performed between two values. Answer will be true or false.
>document.write(10<20); document.write("<br/>"); document.write(10<5);
Output of above code
Example of Boolean constructor
>Boolean b=new Boolean(value);
There are two boolean properties are given:
|constructor||This property is used to returns the reference of Boolean function that created Boolean object.|
|prototype||This property is used to enables you to add properties and methods in Boolean prototype.|
If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.