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: Value Types]

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

Parent

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

console.log ( Reflect.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

JS Array

  1. Understand JS Array
  2. Create Array
  3. Sparse Array
  4. Array-Like Object
  5. Array How-To
Liket it? I spend 2 years writing this tutorial. Help me spread it. Tell your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials

  1. HTML
  2. Visual CSS
  3. JS in Depth
  4. JS Object Reference
  5. DOM Scripting
  6. SVG
  7. Blog