Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Array

Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!

An array is an ordered collection of data (either primitive or object depending upon the language). Arrays are used to store multiple values in a single variable. This is compared to a variable that can only store one value. 

Each item in an array has a number attached to it, called a numeric index, that allows you to access it. In JavaScript, array's start at index zero and can be manipulated with various methods

What an array in JavaScript looks like:

var myArray = [1, 2, 3, 4];

var catNamesArray = ["Jacqueline", "Sophia", "Autumn"];

//Array's in JavaScript can hold different types of data, as shown above.

 

Learn more

General knowledge

Technical reference

  • Javascript Array on MDN

 

Метки документа и участники

 Внесли вклад в эту страницу: SnoopyRules, klez, Andrew_Pfeiffer, Jeremie, hbloomer, alispivak, panaggio
 Обновлялась последний раз: SnoopyRules,