**The aim of this puzzle**: Draw a different picture depending on the result of a coin flip.

**Walkthrough of the solution**: The `answer`

variable stores a string picked at random from the array. It will either hold ‘heads’ or ‘tails’. The value gets printed out and then it’s time to draw the boxes. But first, we need to know which string the `answer`

is storing, so we use an *if statement* and check if the `answer`

is equal to ‘heads’. If it is, then we draw a picture. Now we need to add another check for when `answer`

is ‘tails’, so after the first *if statement* is over, we add another *if statement* that checks if `answer`

is equal to ‘tails’. In the block of that new *if statement* we add a `drawBoxes()`

call and a *string* that describes a pattern of colors. Try giving it a different pattern than the one for ‘heads’.

**Sample code solution**:

(Tap below to reveal)

```
var answer = pickRandom([
'heads',
'tails'
]);
print(answer);
if (answer === 'heads') {
drawBoxes('gwg ggg gwg');
}
if (answer === 'tails') {
drawBoxes('rrr wrw wrw');
}
```

**JavaScript Concepts**: Binary Expression (===), Calling Functions, Conditionals (if statement), Data Structures (Arrays), Identifiers, Variable Declaration

**Grasshopper Concepts**: pickRandom(), print()