MCPcopy Create free account
hub / github.com/codemistic/Web-Development / flipCard

Function flipCard

Memory Game/app.js:106–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105}
106function flipCard() {
107
108 const cardId = this.getAttribute("data-id");
109 cardChosen.push(cardArray[cardId].name);
110 cardChosenId.push(cardId);
111 console.log(cardChosen);
112 console.log(cardChosenId);
113 this.setAttribute("src", cardArray[cardId].img);
114
115 if (cardChosen.length === 2) {
116 setTimeout(checkMatch, 500)
117 }
118}

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected