mozilla

Revision 34633 of Standard built-in objects

  • Revision slug: JavaScript/Reference/Global_Objects
  • Revision title: Global Objects
  • Revision id: 34633
  • Created:
  • Creator: Sevenspade
  • Is current revision? No
  • Comment section heading level; more appropriate headings; use sentence case; make it clear that the first paragraph is a comment; 10 words added, 4 words removed

Revision Content

<!-- The main JSRef index uses inclusion to synchronize content from this page. There are tags below to ensure this works well. Please do not make changes to this page without checking the effects on other pages; use 'What links here' on the sidebar to check for pages that include this content -->

This chapter documents all the JavaScript objects, along with their methods and properties.

The term "global objects" here is not to be confused with the global object. Here, global objects refer to objects in the global scope. The global object itself can be accessed by this in the global scope. In fact, the global scope consists of the properties of the global object (including inherited properties, if any).

Standard global objects (by category)

General-purpose constructors

Typed array constructors

Error constructors

Non-constructor functions

Other

Standard global objects (alphabetically)

Other objects in the global scope are either created by the user script or provided by the host application. The host objects available in Gecko-based browsers are documented in the Gecko DOM Reference.

For more information about the distinction between the DOM and core JavaScript, see The DOM and JavaScript article.

{{ languages( { "es": "es/Referencia_de_JavaScript_1.5/Objetos_globales", "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript_1.5_Core/Objets_globaux", "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty", "ru": "ru/Справочник_по_JavaScript 1.5/Глобальные_объекты" } ) }}

Revision Source

<p><span class="comment">&lt;!-- The main JSRef index uses inclusion to synchronize content from this page. There are tags below to ensure this works well. Please do not make changes to this page without checking the effects on other pages; use 'What links here' on the sidebar to check for pages that include this content --&gt;</span></p>
<p>This chapter documents all the JavaScript objects, along with their methods and properties.</p>
<div class="onlyinclude"> <p>The term "global objects" here is not to be confused with the <em>global object</em>. Here, global objects refer to <em>objects in the global scope</em>. The global object itself can be accessed by <a href="/en/JavaScript/Reference/Operators/this" title="en/JavaScript/Reference/Operators/Special_Operators/this_Operator"><code>this</code></a> in the global scope. In fact, the global scope <em>consists</em><em> of</em> the properties of the global object (including inherited properties, if any).</p> <h2>Standard global objects (by category)</h2> <h3>General-purpose constructors</h3> <ul> <li><a href="/en/JavaScript/Reference/Global_Objects/Array" title="en/JavaScript/Reference/Global_Objects/Array">Array</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Date" title="en/JavaScript/Reference/Global_Objects/Date">Date</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Function" title="en/JavaScript/Reference/Global_Objects/Function">Function</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Iterator" title="en/JavaScript/Reference/Global_Objects/Iterator">Iterator</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Number" title="en/JavaScript/Reference/Global_Objects/Number">Number</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/JavaScript/Reference/Global_Objects/Object">Object</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/RegExp" title="en/JavaScript/Reference/Global_Objects/RegExp">RegExp</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/String" title="en/JavaScript/Reference/Global_Objects/String">String</a></li> </ul> <h3>Typed array constructors</h3> <ul> <li><a href="/en/JavaScript_typed_arrays/ArrayBuffer" title="en/JavaScript_typed_arrays/ArrayBuffer">ArrayBuffer</a></li> <li><a href="/en/JavaScript_typed_arrays/Float32Array" title="en/JavaScript_typed_arrays/Float32Array">Float32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Float64Array" title="en/JavaScript_typed_arrays/Float64Array">Float64Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Int16Array" title="en/JavaScript_typed_arrays/Int16Array">Int16Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Int32Array" title="en/JavaScript_typed_arrays/Int32Array">Int32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Int8Array" title="en/JavaScript_typed_arrays/Int8Array">Int8Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint16Array" title="en/JavaScript_typed_arrays/int16Array">Uint16Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint32Array" title="en/JavaScript_typed_arrays/Uint32Array">Uint32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint8Array" title="en/JavaScript_typed_arrays/int8Array">Uint8Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint8ClampedArray" title="en/JavaScript_typed_arrays/Uint8ClampedArray">Uint8ClampedArray</a></li> </ul> <h3>Error constructors</h3> <ul> <li><a href="/en/JavaScript/Reference/Global_Objects/Error" title="en/JavaScript/Reference/Global_Objects/Error">Error</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/EvalError" title="en/JavaScript/Reference/Global_Objects/EvalError">EvalError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/InternalError" title="en/JavaScript/Reference/Global_Objects/InternalError">InternalError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/RangeError" title="en/JavaScript/Reference/Global_Objects/RangeError">RangeError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/ReferenceError" title="en/JavaScript/Reference/Global_Objects/ReferenceError">ReferenceError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/StopIteration" title="en/JavaScript/Reference/Global_Objects/StopIteration">StopIteration</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/SyntaxError" title="en/JavaScript/Reference/Global_Objects/SyntaxError">SyntaxError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/TypeError" title="en/JavaScript/Reference/Global_Objects/TypeError">TypeError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/URIError" title="en/JavaScript/Reference/Global_Objects/URIError">URIError</a></li> </ul> <h3>Non-constructor functions</h3> <ul> <li><a href="/en/JavaScript/Reference/Global_Objects/decodeURI" title="en/JavaScript/Reference/Global_Objects/decodeURI">decodeURI</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/decodeURIComponent" title="en/JavaScript/Reference/Global_Objects/decodeURIComponent">decodeURIComponent</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/encodeURI" title="en/JavaScript/Reference/Global_Objects/encodeURI">encodeURI</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/encodeURIComponent" title="en/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/eval" title="en/JavaScript/Reference/Global_Objects/eval">eval</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/isFinite" title="en/JavaScript/Reference/Global_Objects/isFinite">isFinite</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/isNaN" title="en/JavaScript/Reference/Global_Objects/isNaN">isNaN</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/parseFloat" title="en/JavaScript/Reference/Global_Objects/parseFloat">parseFloat</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/parseInt" title="en/JavaScript/Reference/Global_Objects/parseInt">parseInt</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/uneval" title="en/JavaScript/Reference/Global_Objects/uneval">uneval</a></li> </ul> <h3>Other</h3> <ul> <li><a href="/en/JavaScript/Reference/Global_Objects/Infinity" title="en/JavaScript/Reference/Global_Properties/Infinity">Infinity</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/JSON" title="en/JavaScript/Reference/Global_Objects/JSON">JSON</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Math" title="en/JavaScript/Reference/Global_Objects/Math">Math</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/NaN" title="en/JavaScript/Reference/Global_Properties/NaN">NaN</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/undefined" title="en/JavaScript/Reference/Global_Properties/undefined">undefined</a></li> </ul> <h2>Standard global objects (alphabetically)</h2> <ul> <li><a href="/en/JavaScript/Reference/Global_Objects/Array" title="en/JavaScript/Reference/Global_Objects/Array">Array</a></li> <li><a href="/en/JavaScript_typed_arrays/ArrayBuffer" title="en/JavaScript_typed_arrays/ArrayBuffer">ArrayBuffer</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Date" title="en/JavaScript/Reference/Global_Objects/Date">Date</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/decodeURI" title="en/JavaScript/Reference/Global_Objects/decodeURI">decodeURI</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/decodeURIComponent" title="en/JavaScript/Reference/Global_Objects/decodeURIComponent">decodeURIComponent</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/encodeURI" title="en/JavaScript/Reference/Global_Objects/encodeURI">encodeURI</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/encodeURIComponent" title="en/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Error" title="en/JavaScript/Reference/Global_Objects/Error">Error</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/eval" title="en/JavaScript/Reference/Global_Objects/eval">eval</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/EvalError" title="en/JavaScript/Reference/Global_Objects/EvalError">EvalError</a></li> <li><a href="/en/JavaScript_typed_arrays/Float32Array" title="en/JavaScript_typed_arrays/Float32Array">Float32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Float64Array" title="en/JavaScript_typed_arrays/Float64Array">Float64Array</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Function" title="en/JavaScript/Reference/Global_Objects/Function">Function</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Infinity" title="en/JavaScript/Reference/Global_Properties/Infinity">Infinity</a></li> <li><a href="/en/JavaScript_typed_arrays/Int16Array" title="en/JavaScript_typed_arrays/Int16Array">Int16Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Int32Array" title="en/JavaScript_typed_arrays/Int32Array">Int32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Int8Array" title="en/JavaScript_typed_arrays/Int8Array">Int8Array</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/isFinite" title="en/JavaScript/Reference/Global_Objects/isFinite">isFinite</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/isNaN" title="en/JavaScript/Reference/Global_Objects/isNaN">isNaN</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Iterator" title="en/JavaScript/Reference/Global_Objects/Iterator">Iterator</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/JSON" title="en/JavaScript/Reference/Global_Objects/JSON">JSON</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Math" title="en/JavaScript/Reference/Global_Objects/Math">Math</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/NaN" title="en/JavaScript/Reference/Global_Properties/NaN">NaN</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Number" title="en/JavaScript/Reference/Global_Objects/Number">Number</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/JavaScript/Reference/Global_Objects/Object">Object</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/parseFloat" title="en/JavaScript/Reference/Global_Objects/parseFloat">parseFloat</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/parseInt" title="en/JavaScript/Reference/Global_Objects/parseInt">parseInt</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/RangeError" title="en/JavaScript/Reference/Global_Objects/RangeError">RangeError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/ReferenceError" title="en/JavaScript/Reference/Global_Objects/ReferenceError">ReferenceError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/RegExp" title="en/JavaScript/Reference/Global_Objects/RegExp">RegExp</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/StopIteration" title="en/JavaScript/Reference/Global_Objects/StopIteration">StopIteration</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/String" title="en/JavaScript/Reference/Global_Objects/String">String</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/SyntaxError" title="en/JavaScript/Reference/Global_Objects/SyntaxError">SyntaxError</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/TypeError" title="en/JavaScript/Reference/Global_Objects/TypeError">TypeError</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint16Array" title="en/JavaScript_typed_arrays/Uint16Array">Uint16Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint32Array" title="en/JavaScript_typed_arrays/Uint32Array">Uint32Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint8Array" title="en/JavaScript_typed_arrays/Uint8Array">Uint8Array</a></li> <li><a href="/en/JavaScript_typed_arrays/Uint8ClampedArray" title="en/JavaScript_typed_arrays/Uint8ClampedArray">Uint8ClampedArray</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/undefined" title="en/JavaScript/Reference/Global_Properties/undefined">undefined</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/uneval" title="en/JavaScript/Reference/Global_Objects/uneval">uneval</a></li> <li><a href="/en/JavaScript/Reference/Global_Objects/URIError" title="en/JavaScript/Reference/Global_Objects/URIError">URIError</a></li> </ul> <p>Other objects in the global scope are either <a href="/en/JavaScript/Guide/Working_with_Objects#Creating_New_Objects" title="en/Core_JavaScript_1.5_Guide/Working_with_Objects#Creating_New_Objects">created by the user script</a> or provided by the host application. The host objects available in <a href="/en/Gecko" title="en/Gecko">Gecko</a>-based browsers are documented in the <a href="/en/Gecko_DOM_Reference" title="en/Gecko_DOM_Reference">Gecko DOM Reference</a>.</p> <p>For more information about the distinction between the <a href="/en/DOM" title="en/DOM">DOM</a> and core <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>, see <a href="/en/JavaScript_technologies_overview" title="en/The_DOM_and_JavaScript">The DOM and JavaScript</a> article.</p>
</div>
<p>{{ languages( { "es": "es/Referencia_de_JavaScript_1.5/Objetos_globales", "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript_1.5_Core/Objets_globaux", "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty", "ru": "ru/Справочник_по_JavaScript 1.5/Глобальные_объекты" } ) }}</p>
Revert to this revision