Menu

JAVASCRIPT TUTORIALS - Javascript - Boolean

Javascript - Boolean

ADVERTISEMENTS


var val = new Boolean(value);

ADVERTISEMENTS

PropertyDescription
constructor Returns a reference to the Boolean function that created the object.
prototypeThe prototype property allows you to add properties and methods to an object.

ADVERTISEMENTS

MethodDescription
toSource()Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.
toString()Returns a string of either "true" or "false" depending upon the value of the object.
valueOf()Returns the primitive value of the Boolean object.