Turning a card over is about to get rules: pairs, a limit of two cards, moves. We give it its own function, flip,
and the click only calls it. It refuses a missing card or one that is already face up.
```js
function flip(card) {
if (!card || card.faceUp) return
card.faceUp = true
}
flip(cardAt(x, y))
```
What it means
!card means "there is no card". || means "or".
return leaves the function at once, so the card is only turned when both checks pass.
The click now just calls flip(cardAt(x, y)).
Your turn
Above the click listener, write flip and an empty line.
In the listener, replace the last two lines with flip(cardAt(x, y)).