()
| 3 | let firstCard,secondCard; |
| 4 | let lock= false; |
| 5 | function flip(){ |
| 6 | if(lock)return; |
| 7 | if(this===firstCard)return; |
| 8 | this.classList.add('flipping'); |
| 9 | |
| 10 | if(!isClicked){ |
| 11 | isClicked=true; |
| 12 | firstCard=this; |
| 13 | } |
| 14 | else { |
| 15 | secondCard=this; |
| 16 | |
| 17 | checkIfMatch(); |
| 18 | |
| 19 | } |
| 20 | |
| 21 | |
| 22 | } |
| 23 | function checkIfMatch(){ |
| 24 | if(firstCard.dataset.framework===secondCard.dataset.framework){ |
| 25 | disableFlip(); |
nothing calls this directly
no test coverage detected