JS: Array Object

By Xah Lee. Date: . Last updated: .

Array is the value of the property key "Array" of the global object. [JS: the Global Object]

console.log( window["Array"] === Array ); // true

Type

Array is a function.

[see JS: Data Types]

// type of Array
console.log ( typeof Array === "function" ); // true

Parent

Parent of Array is Function.prototype. [see JS: Prototype and Inheritance]

// parent of Array
console.log ( Object.getPrototypeOf ( Array ) === Function.prototype ); // true

Purpose

Purpose of Array is:

  1. To create array objects.
  2. Used as a namespace to hold general purpose methods for working with array objects.
  3. Holds the property key "prototype". The value of Array.prototype is the parent object of all array objects.

Array Constructor

[see JS: Array Constructor]

Properties

Reference

ECMAScript® 2016 Language Specification#sec-array-objects

Array Topic

  1. JS: Array Basics
  2. JS: Understand JS Array
  3. JS: Create Array
  4. JS: Sparse Array
  5. JS: Array-Like Object
  6. JS: Array How-To

  1. JS: Array Object
  2. JS: Array.prototype
Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

Ask me question on patreon