Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:Boolean:prototype

From MDC


Contents

[edit] Summary

Represents the prototype for the Boolean constructor.

[edit] Description

Boolean instances inherit from Boolean.prototype. You can use the constructor's prototype object to add properties or methods to all Boolean instances.

[edit] Properties

constructor
Returns the function that created an instance's prototype. This is the Boolean function by default.

[edit] Methods

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

Methods inherited from Object.prototype
__defineGetter__, __defineSetter__, hasOwnProperty, isPrototypeOf, __lookupGetter__, __lookupSetter__, __noSuchMethod__, propertyIsEnumerable, unwatch, watch