mozilla

Compare Revisions

Boolean.prototype

Change Revisions

Revision 32584:

Revision 32584 by Mgjbot on

Revision 32585:

Revision 32585 by delae on

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

Revision 32584
Revision 32585
nn7    <p>
8      &nbsp;
9    </p>
n11      Represents the prototype for the <a href="en/Core_JavaScripn14      Represents the prototype for the <a href="/en/Core_JavaScri
>t_1.5_Reference/Global_Objects/Boolean">Boolean</a> constructor.>pt_1.5_Reference/Global_Objects/Boolean" title="en/Core_JavaScrip
 >t_1.5_Reference/Global_Objects/Boolean">Boolean</a> constructor.
n17      <div class="noinclude">n20      <div class="includeonly">
18        <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/21        <p>
>Boolean">Core_JavaScript_1.5_Reference:Global_Objects:Boolean</a> 
22          <a class="internal" href="/en/Core%20JavaScript%201.5%2
 >0Reference/Global%20Objects/Boolean" title="en/Core JavaScript 1.
 >5 Reference/Global Objects/Boolean">Boolean</a> instances inherit
 > from <a class="internal" href="/en/Core%20JavaScript%201.5%20Ref
 >erence/Global%20Objects/Boolean/Prototype" title="en/Core JavaScr
 >ipt 1.5 Reference/Global Objects/Boolean/Prototype">Boolean.proto
 >type</a>. You can use the constructor's prototype object to add p
 >roperties or methods to all <a class="internal" href="/en/Core%20
 >JavaScript%201.5%20Reference/Global%20Objects/Boolean" title="en/
 >Core JavaScript 1.5 Reference/Global Objects/Boolean">Boolean</a>
 > instances.
23        </p>
24        <h4>
25          Properties
26        </h4>
27        <dl>
28          <dt>
29            <a href="/en/Core_JavaScript_1.5_Reference/Global_Obj
 >ects/Boolean/constructor" title="en/Core_JavaScript_1.5_Reference
 >/Global_Objects/Boolean/constructor">constructor</a>
30          </dt>
31          <dd>
32            Returns the function that created an instance's proto
 >type. This is the <a class="internal" href="/en/Core%20JavaScript
 >%201.5%20Reference/Global%20Objects/Boolean" title="en/Core JavaS
 >cript 1.5 Reference/Global Objects/Boolean">Boolean</a> function 
 >by default.
33          </dd>
34        </dl>
35        <h4>
36          Methods
37        </h4>
38        <dl>
39          <dt>
40            <a href="/en/Core_JavaScript_1.5_Reference/Global_Obj
 >ects/Boolean/toSource" title="en/Core_JavaScript_1.5_Reference/Gl
 >obal_Objects/Boolean/toSource">toSource</a>
41          </dt>
42          <dd>
43            Returns a string containing the source of the <a clas
 >s="internal" href="/en/Core%20JavaScript%201.5%20Reference/Global
 >%20Objects/Boolean" title="en/Core JavaScript 1.5 Reference/Globa
 >l Objects/Boolean">Boolean</a> object; you can use this string to
 > create an equivalent object. Overrides the <a href="/en/Core_Jav
 >aScript_1.5_Reference/Global_Objects/Object/toSource" title="en/C
 >ore_JavaScript_1.5_Reference/Global_Objects/Object/toSource">Obje
 >ct.prototype.toSource</a> method.
44          </dd>
45        </dl>
46        <dl>
47          <dt>
48            <a href="/en/Core_JavaScript_1.5_Reference/Global_Obj
 >ects/Boolean/toString" title="en/Core_JavaScript_1.5_Reference/Gl
 >obal_Objects/Boolean/toString">toString</a>
49          </dt>
50          <dd>
51            Returns a string of either "true" or "false" dependin
 >g upon the value of the object. Overrides the <a href="/en/Core_J
 >avaScript_1.5_Reference/Global_Objects/Object/toString" title="en
 >/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString">Ob
 >ject.prototype.toString</a> method.
52          </dd>
53        </dl>
54        <dl>
55          <dt>
56            <a href="/en/Core_JavaScript_1.5_Reference/Global_Obj
 >ects/Boolean/valueOf" title="en/Core_JavaScript_1.5_Reference/Glo
 >bal_Objects/Boolean/valueOf">valueOf</a>
57          </dt>
58          <dd>
59            Returns the primitive value of the <a class="internal
 >" href="/en/Core%20JavaScript%201.5%20Reference/Global%20Objects/
 >Boolean" title="en/Core JavaScript 1.5 Reference/Global Objects/B
 >oolean">Boolean</a> object. Overrides the <a href="/en/Core_JavaS
 >cript_1.5_Reference/Global_Objects/Object/valueOf" title="en/Core
 >_JavaScript_1.5_Reference/Global_Objects/Object/valueOf">Object.p
 >rototype.valueOf</a> method.
60          </dd>
61        </dl>{{ JSInherits("Object", "Methods", "__defineGetter__
 >", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__look
 >upGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIsE
 >numerable", "unwatch", "watch") }}
n20      <div class="includeonly">n
21        <code>&lt;/div&gt;Boolean</code>
22        <div class="includeonly">
23          <code>&lt;/code&gt;</code>
24        </div>
25        <div class="noinclude">
26          <code>instances inherit from</code>
27          <div class="noinclude">
28            <code>&lt;code&gt;</code>
29          </div>
30          <div class="includeonly">
31            <code><a href="en/Core_JavaScript_1.5_Reference/Globa
>l_Objects/Boolean/prototype">Core_JavaScript_1.5_Reference:Global 
>_Objects:Boolean:prototype</a></code> 
32          </div><code>Boolean.prototype</code>
33          <div class="includeonly">
34            <div class="noinclude">
35              <code>&lt;/code&gt;</code>
36            </div><code>. You can use the constructor's prototype
> object to add properties or methods to all &lt;code&gt;Boolean</ 
>code> instances. 
37            <div class="includeonly">
38              =
39            </div>== Properties ==
40            <div class="includeonly">
41              =
42            </div>
43            <dl>
44              <dt>
45                <a href="en/Core_JavaScript_1.5_Reference/Global_
>Objects/Boolean/constructor">constructor</a> 
46              </dt>
47              <dd>
48                Returns the function that created an instance's p
>rototype. This is the <code>Boolean</code> function by default. 
49              </dd>
50            </dl>
51            <div class="includeonly">
52              =
53            </div>== Methods ==
54            <div class="includeonly">
55              =
56            </div>
57            <dl>
58              <dt>
59                <a href="en/Core_JavaScript_1.5_Reference/Global_
>Objects/Boolean/toSource">toSource</a> 
60              </dt>
61              <dd>
62                Returns a string containing the source of the <co
>de>Boolean</code> object; you can use this string to create an eq 
>uivalent object. Overrides the <a href="en/Core_JavaScript_1.5_Re 
>ference/Global_Objects/Object/toSource">Object.prototype.toSource 
></a> method. 
63              </dd>
64            </dl>
65            <dl>
66              <dt>
67                <a href="en/Core_JavaScript_1.5_Reference/Global_
>Objects/Boolean/toString">toString</a> 
68              </dt>
69              <dd>
70                Returns a string of either "true" or "false" depe
>nding upon the value of the object. Overrides the <a href="en/Cor 
>e_JavaScript_1.5_Reference/Global_Objects/Object/toString">Object 
>.prototype.toString</a> method. 
71              </dd>
72            </dl>
73            <dl>
74              <dt>
75                <a href="en/Core_JavaScript_1.5_Reference/Global_
>Objects/Boolean/valueOf">valueOf</a> 
76              </dt>
77              <dd>
78                Returns the primitive value of the <code>Boolean<
>/code> object. Overrides the <a href="en/Core_JavaScript_1.5_Refe 
>rence/Global_Objects/Object/valueOf">Object.prototype.valueOf</a> 
> method. 
79              </dd>
80            </dl>{{ JSInherits("Object", "Methods", "__defineGett
>er__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__ 
>lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "propert 
>yIsEnumerable", "unwatch", "watch") }} 
81          </div>
82          <p>63      <p>
83            <br>64        &nbsp;
84          </p>65      </p>
85          <div class="noinclude"></div>
86        </div>{{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_Ja
>vaScript_1.5_Core/Objets_globaux/Boolean/prototype", "ja": "ja/Co 
>re_JavaScript_1.5_Reference/Global_Objects/Boolean/prototype", "p 
>l": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Boolean/p 
>rototype" } ) }} 
87      </div>
tt67    <p>
68      {{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript
 >_1.5_Core/Objets_globaux/Boolean/prototype", "ja": "ja/Core_JavaS
 >cript_1.5_Reference/Global_Objects/Boolean/prototype", "pl": "pl/
 >Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Boolean/prototype
 >" } ) }}
69    </p>

Back to History