mozilla

Revision 498029 of Standard built-in objects

  • Revision slug: Web/JavaScript/Reference/Global_Objects
  • Revision title: Standard built-in objects
  • Revision id: 498029
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{JSObjectsQLAlpha()}}

Summary

This chapter documents all the JavaScript standard built-in objects, along with their methods and properties.

The term "global objects" (or standard built-in objects) here is not to be confused with the global object. Here, global objects refer to objects in the global scope (but only if ECMAScript 5 strict mode is not used! Otherwise it returns undefined). The global object itself can be accessed by the {{jsxref("Operators/this", "this")}} operator in the global scope. In fact, the global scope consists of the properties of the global object (including inherited properties, if any).

Other objects in the global scope are either created by the user script or provided by the host application. The host objects available in browser contexts are documented in the API reference. For more information about the distinction between the DOM and core JavaScript, see JavaScript technologies overview.

Standard objects (by category)

Value properties

Global properties returning a simple value.

  • {{jsxref("Global_Objects/Infinity", "Infinity")}}
  • {{jsxref("Global_Objects/NaN", "NaN")}}
  • {{jsxref("Global_Objects/undefined", "undefined")}}

Function properties

Global functions returning the result of a specific routine.

  • {{jsxref("Global_Objects/eval", "eval()")}}
  • {{jsxref("Global_Objects/uneval", "uneval()")}} {{non-standard_inline()}}
  • {{jsxref("Global_Objects/isFinite", "isFinite()")}}
  • {{jsxref("Global_Objects/isNaN", "isNaN()")}}
  • {{jsxref("Global_Objects/parseFloat", "parseFloat()")}}
  • {{jsxref("Global_Objects/parseInt", "parseInt()")}}
  • {{jsxref("Global_Objects/decodeURI", "decodeURI()")}}
  • {{jsxref("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}
  • {{jsxref("Global_Objects/encodeURI", "encodeURI()")}}
  • {{jsxref("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}
  • {{jsxref("Global_Objects/escape", "escape()")}} {{deprecated_inline()}}
  • {{jsxref("Global_Objects/unescape", "unescape()")}} {{deprecated_inline()}}

Fundamental objects

General language objects, functions and errors.

  • {{jsxref("Global_Objects/Object", "Object")}}
  • {{jsxref("Global_Objects/Function", "Function")}}
  • {{jsxref("Global_Objects/Boolean", "Boolean")}}
  • {{jsxref("Global_Objects/Symbol", "Symbol")}} {{experimental_inline()}}
  • {{jsxref("Global_Objects/Error", "Error")}}
  • {{jsxref("Global_Objects/EvalError", "EvalError")}}
  • {{jsxref("Global_Objects/InternalError", "InternalError")}}
  • {{jsxref("Global_Objects/RangeError", "RangeError")}}
  • {{jsxref("Global_Objects/ReferenceError", "ReferenceError")}}
  • {{jsxref("Global_Objects/StopIteration", "StopIteration")}}
  • {{jsxref("Global_Objects/SyntaxError", "SyntaxError")}}
  • {{jsxref("Global_Objects/TypeError", "TypeError")}}
  • {{jsxref("Global_Objects/URIError", "URIError")}}

Numbers and dates

Objects dealing with numbers, dates and mathematical calculations.

  • {{jsxref("Global_Objects/Number", "Number")}}
  • {{jsxref("Global_Objects/Math", "Math")}}
  • {{jsxref("Global_Objects/Date", "Date")}}

Text processing

Objects for manipulating texts.

  • {{jsxref("Global_Objects/String", "String")}}
  • {{jsxref("Global_Objects/Regexp", "RegExp")}}

Indexed collections

Collections ordered by an index. Array-type objects.

Keyed collections

Collections of objects as keys. Elements iterable in insertion order.

  • {{jsxref("Global_Objects/Map", "Map")}} {{experimental_inline()}}
  • {{jsxref("Global_Objects/Set", "Set")}} {{experimental_inline()}}
  • {{jsxref("Global_Objects/Map", "WeakMap")}} {{experimental_inline()}}
  • {{jsxref("Global_Objects/WeakSet", "WeakSet")}} {{experimental_inline()}}

Structured data

Data buffers and JavaScript Object Notation.

Control abstraction objects

  • {{jsxref("Global_Objects/Generator", "Generator")}} {{experimental_inline()}}

Reflection

  • {{jsxref("Global_Objects/Reflect", "Reflect")}} {{experimental_inline()}}
  • {{jsxref("Global_Objects/Proxy", "Proxy")}} {{experimental_inline()}}

Internationalization

Additions to the ECMAScript core for language-sensitive functionalities.

Other

Revision Source

<div>
 {{JSObjectsQLAlpha()}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>This chapter documents all the JavaScript standard built-in objects, along with their methods and properties.</p>
<div class="onlyinclude">
 <p>The term "global objects" (or standard built-in 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> (but only if ECMAScript 5 strict mode is not used! Otherwise it returns <code>undefined</code>). The <em>global object</em> itself can be accessed by the {{jsxref("Operators/this", "this")}} operator 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>
 <p>Other objects in the global scope are either <a href="/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Creating_new_objects">created by the user script</a> or provided by the host application. The host objects available in browser contexts are documented in the <a href="/en-US/docs/Web/API/Reference">API reference</a>. For more information about the distinction between the <a href="/en-US/docs/DOM/DOM_Reference">DOM</a> and core <a href="/en-US/docs/Web/JavaScript">JavaScript</a>, see <a href="/en-US/docs/Web/JavaScript/JavaScript_technologies_overview">JavaScript technologies overview</a>.</p>
 <h2 id="Standard_objects_(by_category)">Standard objects (by category)</h2>
 <h3 id="Value_properties">Value properties</h3>
 <p>Global properties returning a simple value.</p>
 <ul>
  <li>{{jsxref("Global_Objects/Infinity", "Infinity")}}</li>
  <li>{{jsxref("Global_Objects/NaN", "NaN")}}</li>
  <li>{{jsxref("Global_Objects/undefined", "undefined")}}</li>
 </ul>
 <h3 id="Function_properties">Function properties</h3>
 <p>Global functions returning the result of a specific routine.</p>
 <ul>
  <li>{{jsxref("Global_Objects/eval", "eval()")}}</li>
  <li>{{jsxref("Global_Objects/uneval", "uneval()")}} {{non-standard_inline()}}</li>
  <li>{{jsxref("Global_Objects/isFinite", "isFinite()")}}</li>
  <li>{{jsxref("Global_Objects/isNaN", "isNaN()")}}</li>
  <li>{{jsxref("Global_Objects/parseFloat", "parseFloat()")}}</li>
  <li>{{jsxref("Global_Objects/parseInt", "parseInt()")}}</li>
  <li>{{jsxref("Global_Objects/decodeURI", "decodeURI()")}}</li>
  <li>{{jsxref("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}</li>
  <li>{{jsxref("Global_Objects/encodeURI", "encodeURI()")}}</li>
  <li>{{jsxref("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</li>
  <li>{{jsxref("Global_Objects/escape", "escape()")}} {{deprecated_inline()}}</li>
  <li>{{jsxref("Global_Objects/unescape", "unescape()")}} {{deprecated_inline()}}</li>
 </ul>
 <h3 id="Fundamental_objects">Fundamental objects</h3>
 <p>General language objects, functions and errors.</p>
 <ul>
  <li>{{jsxref("Global_Objects/Object", "Object")}}</li>
  <li>{{jsxref("Global_Objects/Function", "Function")}}</li>
  <li>{{jsxref("Global_Objects/Boolean", "Boolean")}}</li>
  <li>{{jsxref("Global_Objects/Symbol", "Symbol")}} {{experimental_inline()}}</li>
  <li>{{jsxref("Global_Objects/Error", "Error")}}</li>
  <li>{{jsxref("Global_Objects/EvalError", "EvalError")}}</li>
  <li>{{jsxref("Global_Objects/InternalError", "InternalError")}}</li>
  <li>{{jsxref("Global_Objects/RangeError", "RangeError")}}</li>
  <li>{{jsxref("Global_Objects/ReferenceError", "ReferenceError")}}</li>
  <li>{{jsxref("Global_Objects/StopIteration", "StopIteration")}}</li>
  <li>{{jsxref("Global_Objects/SyntaxError", "SyntaxError")}}</li>
  <li>{{jsxref("Global_Objects/TypeError", "TypeError")}}</li>
  <li>{{jsxref("Global_Objects/URIError", "URIError")}}</li>
 </ul>
 <h3 id="Numbers_and_dates">Numbers and dates</h3>
 <p>Objects dealing with numbers, dates and mathematical calculations.</p>
 <ul>
  <li>{{jsxref("Global_Objects/Number", "Number")}}</li>
  <li>{{jsxref("Global_Objects/Math", "Math")}}</li>
  <li>{{jsxref("Global_Objects/Date", "Date")}}</li>
 </ul>
 <h3 id="Text_processing">Text processing</h3>
 <p>Objects for manipulating texts.</p>
 <ul>
  <li>{{jsxref("Global_Objects/String", "String")}}</li>
  <li>{{jsxref("Global_Objects/Regexp", "RegExp")}}</li>
 </ul>
 <h3 id="Indexed_collections">Indexed collections</h3>
 <p>Collections ordered by an index. Array-type objects.</p>
 <ul>
  <li>{{jsxref("Global_Objects/Array", "Array")}}</li>
  <li>{{jsxref("Global_Objects/Iterator", "Iterator")}} {{experimental_inline()}}</li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Float32Array" title="JavaScript_typed_arrays/Float32Array">Float32Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Float64Array" title="JavaScript_typed_arrays/Float64Array">Float64Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Int16Array" title="JavaScript_typed_arrays/Int16Array">Int16Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Int32Array" title="JavaScript_typed_arrays/Int32Array">Int32Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Int8Array" title="JavaScript_typed_arrays/Int8Array">Int8Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Uint16Array" title="JavaScript_typed_arrays/int16Array">Uint16Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Uint32Array" title="JavaScript_typed_arrays/Uint32Array">Uint32Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Uint8Array" title="JavaScript_typed_arrays/int8Array">Uint8Array</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/Uint8ClampedArray" title="JavaScript_typed_arrays/Uint8ClampedArray">Uint8ClampedArray</a></code></li>
  <li>{{jsxref("Global_Objects/ParallelArray", "ParralelArray")}} {{non-standard_inline()}}</li>
 </ul>
 <h3 id="Keyed_collections">Keyed collections</h3>
 <p>Collections of objects as keys. Elements iterable in insertion order.</p>
 <ul>
  <li>{{jsxref("Global_Objects/Map", "Map")}} {{experimental_inline()}}</li>
  <li>{{jsxref("Global_Objects/Set", "Set")}} {{experimental_inline()}}</li>
  <li>{{jsxref("Global_Objects/Map", "WeakMap")}} {{experimental_inline()}}</li>
  <li>{{jsxref("Global_Objects/WeakSet", "WeakSet")}} {{experimental_inline()}}</li>
 </ul>
 <h3 id="Structured_data">Structured data</h3>
 <p>Data buffers and <span class="st"><strong>J</strong>ava<strong>S</strong>cript <strong>O</strong>bject <strong>N</strong>otation</span>.</p>
 <ul>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/ArrayBuffer" title="JavaScript_typed_arrays/ArrayBuffer">ArrayBuffer</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript_typed_arrays/DataView" title="/en-US/docs/JavaScript_typed_arrays/DataView">DataView</a></code></li>
  <li>{{jsxref("Global_Objects/JSON", "JSON")}}</li>
 </ul>
 <h3 id="Control_abstraction_objects">Control abstraction objects</h3>
 <ul>
  <li>{{jsxref("Global_Objects/Generator", "Generator")}} {{experimental_inline()}}</li>
 </ul>
 <h3 id="Reflection">Reflection</h3>
 <ul>
  <li>{{jsxref("Global_Objects/Reflect", "Reflect")}} {{experimental_inline()}}</li>
  <li>{{jsxref("Global_Objects/Proxy", "Proxy")}} {{experimental_inline()}}</li>
 </ul>
 <h3 id="Internationalization">Internationalization</h3>
 Additions to the ECMAScript core for language-sensitive functionalities.<br />
 <ul>
  <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Intl" title="JavaScript/Reference/Global_Objects/Intl">Intl</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Collator" title="JavaScript/Reference/Global_Objects/Collator">Intl.Collator</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/DateTimeFormat" title="JavaScript/Reference/Global_Objects/DateTimeFormat">Intl.DateTimeFormat</a></code></li>
  <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/NumberFormat" title="JavaScript/Reference/Global_Objects/NumberFormat">Intl.NumberFormat</a></code></li>
 </ul>
 <h3 id="Other">Other</h3>
 <ul>
  <li><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments">arguments</a></code></li>
 </ul>
</div>
Revert to this revision