Arrays

Refresh knowledge about arrays and how they work.

What’s an array?

An array is a data structure in JavaScript that’s similar to a list used for storing shopping items. The list of items in an array is enclosed in a square bracket ([]).

%0 node_1638179136916 eggs node_1638178524095 sugar node_3 cereals node_2 milk node_1 bananas
A shopping list of items

The shopping list above can be represented in code below:

 let shoppinglist = ["bananas", "milk", "cereals", "sugar", "eggs"];

We can access items on an ...