Arrays

A JavaScript array is an ordered collection of values, indexed from 0, written in square brackets. It can mix types and changes size dynamically. It has the length property and methods to add (push), remove (pop), iterate, and transform.

Example

const notes = [12, 15]
notes.push(9)
notes.length  // 3

Related concepts

The whole glossary