Compare Revisions

Boolean.prototype

Change Revisions

Revision 32581:

Revision 32581 by Sevenspade on

Revision 32582:

Revision 32582 by Sevenspade on

Title:
prototype
prototype
Slug:
JavaScript/Reference/Global_Objects/Boolean/prototype
JavaScript/Reference/Global_Objects/Boolean/prototype
Content:

Revision 32581
Revision 32582
t16    <p>t16    <div class="onlyinclude">
17      <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Bo17      <div class="noinclude">
>olean">Boolean</a> instances inherit from <code>Boolean.prototype 
></code>. You can use the constructor's prototype object to add pr 
>operties or methods to all <code>Boolean</code> instances. 
18    </p>18        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/
 >Boolean">Core_JavaScript_1.5_Reference:Global_Objects:Boolean</a>
19    <h3 name="Properties">19      </div>
20      Properties20      <div class="includeonly">
21    </h3>21        <code>&lt;/div&gt;Boolean</code>
22        <div class="includeonly">
23          <code>&lt;/code&gt;</code>
24        </div>
25        <div class="noinclude"></div><code>instances inherit from
 ></code>
26        <div class="noinclude">
27          <code>&lt;code&gt;</code>
28        </div>
29        <div class="includeonly">
30          <code><a href="en/Core_JavaScript_1.5_Reference/Boolean
 >/prototype">Core_JavaScript_1.5_Reference:Boolean:prototype</a></
 >code>
31        </div><code>Boolean.prototype</code>
32        <div class="includeonly"></div>
33        <div class="noinclude">
34          <code>&lt;/code&gt;</code>
35        </div><code>. You can use the constructor's prototype obj
 >ect to add properties or methods to all &lt;code&gt;Boolean</code
 >> instances.
36        <div class="includeonly">
37          =
38        </div>== Properties ==
39        <div class="includeonly">
40          =
41        </div>
22    <dl>42        <dl>
23      <dt>43          <dt>
24        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/44            <a href="en/Core_JavaScript_1.5_Reference/Global_Obje
>Boolean/constructor">constructor</a>>cts/Boolean/constructor">constructor</a>
25      </dt>45          </dt>
26      <dd>46          <dd>
27        Returns the function that created an instance's prototype47            Returns the function that created an instance's proto
>. This is the <a href="en/Core_JavaScript_1.5_Reference/Global_Ob>type. This is the <code>Boolean</code> function by default.
>jects/Boolean">Boolean</a> function by default. 
28      </dd>48          </dd>
29    </dl>49        </dl>
30    <h3 name="Methods">50        <div class="includeonly">
31      Methods51          =
32    </h3>52        </div>== Methods ==
53        <div class="includeonly">
54          =
55        </div>
33    <dl>56        <dl>
34      <dt>57          <dt>
35        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/58            <a href="en/Core_JavaScript_1.5_Reference/Global_Obje
>Boolean/toSource">toSource</a>>cts/Boolean/toSource">toSource</a>
36      </dt>59          </dt>
37      <dd>60          <dd>
38        Returns a string containing the source of the <code>Boole61            Returns a string containing the source of the <code>B
>an</code> object; you can use this string to create an equivalent>oolean</code> object; you can use this string to create an equiva
> object. Overrides the <a href="en/Core_JavaScript_1.5_Reference/>lent object. Overrides the <a href="en/Core_JavaScript_1.5_Refere
>Global_Objects/Object/toSource">Object.prototype.toSource</a> met>nce/Global_Objects/Object/toSource">Object.prototype.toSource</a>
>hod.> method.
39      </dd>62          </dd>
40    </dl>63        </dl>
41    <dl>64        <dl>
42      <dt>65          <dt>
43        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/66            <a href="en/Core_JavaScript_1.5_Reference/Global_Obje
>Boolean/toString">toString</a>>cts/Boolean/toString">toString</a>
44      </dt>67          </dt>
45      <dd>68          <dd>
46        Returns a string of either "true" or "false" depending up69            Returns a string of either "true" or "false" dependin
>on the value of the object. Overrides the <a href="en/Core_JavaSc>g upon the value of the object. Overrides the <a href="en/Core_Ja
>ript_1.5_Reference/Global_Objects/Object/toString">Object.prototy>vaScript_1.5_Reference/Global_Objects/Object/toString">Object.pro
>pe.toString</a> method.>totype.toString</a> method.
47      </dd>70          </dd>
48    </dl>71        </dl>
49    <dl>72        <dl>
50      <dt>73          <dt>
51        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/74            <a href="en/Core_JavaScript_1.5_Reference/Global_Obje
>Boolean/valueOf">valueOf</a>>cts/Boolean/valueOf">valueOf</a>
52      </dt>75          </dt>
53      <dd>76          <dd>
54        Returns the primitive value of the <code>Boolean</code> o77            Returns the primitive value of the <code>Boolean</cod
>bject. Overrides the <a href="en/Core_JavaScript_1.5_Reference/Gl>e> object. Overrides the <a href="en/Core_JavaScript_1.5_Referenc
>obal_Objects/Object/valueOf">Object.prototype.valueOf</a> method.>e/Global_Objects/Object/valueOf">Object.prototype.valueOf</a> met
 >hod.
55      </dd>78          </dd>
56    </dl>
57    <p>
58      {{template.JSInherits("Object", "Methods", "__defineGetter_79        </dl>{{template.JSInherits("Object", "Methods", "__define
>_", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__loo>Getter__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf",
>kupGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIs> "__lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "pro
>Enumerable", "unwatch", "watch")}}>pertyIsEnumerable", "unwatch", "watch")}}
59    </p>80      </div>
81      <div class="noinclude"></div>
60    <div class="noinclude"></div>{{ wiki.languages( { "ja": "ja/C82    </div>{{ wiki.languages( { "ja": "ja/Core_JavaScript_1.5_Refe
>ore_JavaScript_1.5_Reference/Global_Objects/Boolean/prototype", ">rence/Global_Objects/Boolean/prototype", "pl": "pl/Dokumentacja_j
>pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Boolean/>\u0119zyka_JavaScript_1.5/Obiekty/Boolean/prototype" } ) }}
>prototype" } ) }} 

Back to History