Boolean.prototype

  • Revision slug: JavaScript/Reference/Global_Objects/Boolean/prototype
  • Revision title: prototype
  • Revision id: 32583
  • Created:
  • Creator: Sevenspade
  • Is current revision? No
  • Comment /* Description */

Revision Content

Summary

Represents the prototype for the Boolean constructor.

Description

</div>Boolean
</code>
instances inherit from
<code>
Boolean.prototype
</code>
. You can use the constructor's prototype object to add properties or methods to all <code>Boolean
instances.
=
== Properties ==
=
constructor
Returns the function that created an instance's prototype. This is the Boolean function by default.
=
== 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.
{{template.JSInherits("Object", "Methods", "__defineGetter__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIsEnumerable", "unwatch", "watch")}}
{{ wiki.languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/prototype", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Boolean/prototype" } ) }}

Revision Source

<p>
</p>
<h3 name="Summary"> Summary </h3>
<p>Represents the prototype for the <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Boolean</a> constructor.
</p>
<h3 name="Description"> Description </h3>
<div class="onlyinclude"><div class="noinclude"><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Core_JavaScript_1.5_Reference:Global_Objects:Boolean</a></div><div class="includeonly"><code>&lt;/div&gt;Boolean<div class="includeonly">&lt;/code&gt;</div><div class="noinclude"></div> instances inherit from <div class="noinclude">&lt;code&gt;</div><div class="includeonly"><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/prototype">Core_JavaScript_1.5_Reference:Global_Objects:Boolean:prototype</a></div>Boolean.prototype<div class="includeonly"></div><div class="noinclude">&lt;/code&gt;</div>. You can use the constructor's prototype object to add properties or methods to all &lt;code&gt;Boolean</code> instances.
<div class="includeonly">=</div>== Properties ==<div class="includeonly">=</div>
<dl><dt> <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/constructor">constructor</a>
</dt><dd> Returns the function that created an instance's prototype. This is the <code>Boolean</code> function by default.
</dd></dl>
<div class="includeonly">=</div>== Methods ==<div class="includeonly">=</div>
<dl><dt> <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/toSource">toSource</a>
</dt><dd> Returns a string containing the source of the <code>Boolean</code> object; you can use this string to create an equivalent object. Overrides the <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toSource">Object.prototype.toSource</a> method.
</dd></dl>
<dl><dt> <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/toString">toString</a>
</dt><dd> Returns a string of either "true" or "false" depending upon the value of the object. Overrides the <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString">Object.prototype.toString</a> method.
</dd></dl>
<dl><dt> <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/valueOf">valueOf</a>
</dt><dd> Returns the primitive value of the <code>Boolean</code> object. Overrides the <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/valueOf">Object.prototype.valueOf</a> method.
</dd></dl>
{{template.JSInherits("Object", "Methods", "__defineGetter__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIsEnumerable", "unwatch", "watch")}}</div>
<div class="noinclude">
</div></div>
{{ wiki.languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Boolean/prototype", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Boolean/prototype" } ) }}
Revert to this revision