MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / flipCard

Function flipCard

assets/js/Memory_game.js:7–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5let firstCard, secondCard;
6
7function 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
24function checkForMatch() {
25 let isMatch = firstCard.dataset.framework === secondCard.dataset.framework;

Callers

nothing calls this directly

Calls 1

checkForMatchFunction · 0.85

Tested by

no test coverage detected