So far we have handled values one at a time. Today, grouping them. For an ordered sequence, use an array.

const fruits = ['apple', 'orange', 'banana'];

console.log(fruits[0]);
console.log(fruits.length);

Is fruits[0] the first one, apple? Why start at zero?

Most programming languages count array positions from zero. length is the number of elements, so here it is 3, and the last position is length - 1.

You can add elements later, too.

const fruits = ['apple', 'orange'];
fruits.push('banana');

console.log(fruits.length);

It is const, but the contents can still grow?

Good question. const only forbids assigning a different value to that name. You cannot swap the array out for another one, but you can put things into it and take them back out.

When you want several pieces of information about one thing, an object fits better.

const user = {
  name: 'JavaScript',
  level: 1,
  isActive: true,
};

console.log(user.name);

Arrays retrieve by position, objects by a name like name.

Well put. Each name-and-value pair is called a property. Use an array to line up values that play the same role, and an object to gather related information under names.

Combine the two and you can describe data like a list of users or products.

const users = [
  { name: 'TypeScript', level: 3 },
  { name: 'JavaScript', level: 1 },
];

console.log(users[1].name);

More punctuation, but reading outward-in it is "the second item of the array, then its name".

That is the right way to read it. And every value we have handled so far has a kind. Next we finally put that into words: types.