Essential JavaScript

Array Length

Like strings, arrays have a length property.

const letters = ['a', 'b', 'c', 'd'];
console.log(letters.length);
const numbers = [1, 2, 3, 4, 5, 6];
console.log(numbers.length);

Learning Goals

Code Editor