()
| 5 | let firstCard, secondCard; |
| 6 | |
| 7 | function flipCard() { |
| 8 | if (lockBoard) return; |
| 9 | if (this === firstCard) return; |
| 10 | |
| 11 | this.classList.add('flip'); |
| 12 | |
| 13 | if (!hasFlippedCard) { |
| 14 | hasFlippedCard = true; |
| 15 | firstCard = this; |
| 16 | |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | secondCard = this; |
| 21 | checkForMatch(); |
| 22 | } |
| 23 | |
| 24 | function checkForMatch() { |
| 25 | let isMatch = firstCard.dataset.framework === secondCard.dataset.framework; |
nothing calls this directly
no test coverage detected