Learn by Building Workshop Skills GitHub Türkçe Workshop › Hangman › Step 3 of 36
Paint the paper What we are doing Our first drawing: the whole canvas gets a light, paper-like color. The game will be drawn on it.
```js
ctx.fillStyle = '#fefce8'
ctx.fillRect(0, 0, canvas.width, canvas.height)
```What it means
ctx.fillStyle = '#fefce8' picks the fill color, a very light yellow.
ctx.fillRect(x, y, width, height) fills a rectangle. 0, 0 is the top-left corner; canvas.width and
canvas.height (480 and 480) make it cover everything.
Your turn At the very end, after the list, leave an empty line and write the two lines. Press Run .
Skills: Drawing on a canvas
← The canvas and the pen A function that draws →
All steps A list of secret words The canvas and the pen Paint the paper A function that draws Pick a random word Write the word Hide it behind blanks Remember the guesses Draw again and again A guess Guess with the keyboard Only letters count Count the misses The same letter twice is free Six misses at most Show the misses List the wrong letters Draw a line The gallows The first miss: a head Body, arms and legs The parts in a list Losing Winning Show the word you missed The end message Play again Never the same word twice A winning streak Remember the best streak Where each key goes Draw the keys Center the last row Keys that remember Tap a key Build it yourself: a hint button