Core Objects

The core objects are objects that aren't associated with the JavaScript object hierarchy and are available to both client-side and server-side applications.

Array

Description: An array is an object that lets you store sets of data, with each element of the data set stored in its own unique position, which in turn can be referenced or retrieved.

Syntax for creating:

new Array(arrayLength) or

new Array(element0, element1, ..., elementN)

Parameters:

arrayLength— the desired initial length of the array

elementN— This is the initial set of values that will be stored in the array. The array length will be set to the number of arguments.

Implemented in: Navigator 3.0

Properties: index, input, length, prototype

Methods: concat, join, pop, ...

Get Essential JavaScript™ for Web Professionals, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.