Introduction to JS
Introduction Of Javascript
JS boolean object represent the two states of values i.e. true or false We can also create the Javascript Boolean by using Boolean() constructor
We can also construct the number object using Number () constructor.
Let's take an example:-
True
Some Boolean properties and methods are described below :-
Methods/Property | Description |
---|---|
prototype | this property enables you to add properties and methods in Boolean prototype |
constructor | this property use to return the reference of Boolean function that created Boolean object. |
toSource() | returns the source of Boolean object as a string. |
valueOf() | converts other type into Boolean. |
toString() | converts Boolean into String. |
JS training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute