Boolean in JavaScript.

Boolean in JavaScript.

(30 Days Of JavaScript)

ยท

1 min read

The boolean object represents two values, either "true" or "false". If the value parameter is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false.

Use the following syntax to create a boolean object:

var val = new Boolean(value);

Boolean Properties

Following is a list of the properties of Boolean Object:

Screenshot_20210609-140336[1].png

Boolean Methods

Following is a list of methods of Boolean object and their description:

Screenshot_20210609-140744[1].png