Workshop › Hangman › Step 1 of 36
Guess the word one letter at a time before the figure is drawn. A Set of guesses, a masked word in one line, keys filtered down to letters, a drawing made from an array of functions, every() to know when you win, and a keyboard on the screen.
Hangman: the computer picks a secret word and shows only blanks; you guess letters, and every wrong guess draws a bit more of a stick figure. First, the words the computer can pick from, kept in an array.
```js
const WORDS = [
'APPLE', 'BANANA', 'CASTLE', 'DRAGON', 'ELEPHANT', 'FOREST', 'GARDEN', 'HAMMER', 'ISLAND', 'JACKET',
'KITCHEN', 'LEMON', 'MONKEY', 'NOTEBOOK', 'ORANGE', 'PENGUIN', 'QUEEN', 'ROCKET', 'SPIDER', 'TIGER',
'UMBRELLA', 'VIOLIN', 'WINDOW', 'YELLOW', 'ZEBRA', 'BRIDGE', 'CANDLE', 'DOLPHIN', 'ENGINE', 'FLOWER',
'GUITAR', 'HONEY', 'IGLOO', 'JUNGLE', 'KANGAROO', 'LADDER', 'MARKET', 'NEEDLE', 'OCEAN', 'PIRATE',
'RABBIT', 'SILVER', 'TURTLE', 'VALLEY', 'WIZARD', 'PLANET', 'COOKIE', 'PUZZLE', 'KEYBOARD', 'CAMERA',
]
```[ and ] make an array: an ordered list. Items are separated by commas.const WORDS = gives the list a name. The comma after the last item is allowed and keeps lines tidy.Write the list under the three comment lines, then press Run.
Skills: Arrays and objects