Codington
0 of 8 problems solved • 0%

Exercise prompt

Create an Array

An array keeps related values in an ordered list.

Example

const colors = ["red", "blue"];
  • Square brackets [] contain the items, separated by commas.
  • Positions are called indexes and start at 0: "red" is at index 0, and "blue" is at index 1.

Your task

Create pets containing cat, dog, and fish, then display Pets: cat,dog,fish.