Workshop › Simon Says Colors › Step 4 of 27
Each pad has two colors: a dim one for "off" and a bright one for "lit". We keep both in an object, and the four pads
in an array, PADS.
```js
// Each pad: its dim color and its lit color. Pads 0 1 on top, 2 3 below.
const PADS = [
{ dim: '#14532d', lit: '#4ade80' },
{ dim: '#7f1d1d', lit: '#f87171' },
{ dim: '#713f12', lit: '#facc15' },
{ dim: '#1e3a8a', lit: '#60a5fa' },
]
```{ dim: ..., lit: ... } is an object: two named colors in one package.[ ... ] is an array of four such objects: green, red, yellow, blue.PADS[0] is green (top left), PADS[3] blue (bottom right).Under HALF, write the comment and PADS. Copy the color codes carefully. Press Run.
Skills: Arrays and objects
← The first pad All four pads →