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

Function flipCard

Memory game/index.js:106–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105 //flip your card
106 function flipCard() {
107 let cardId = this.getAttribute('data-id')
108 cardsChosen.push(cardArray[cardId].name)
109 cardsChosenId.push(cardId)
110 this.setAttribute('src', cardArray[cardId].img)
111 if (cardsChosen.length ===2) {
112 setTimeout(checkForMatch, 500)
113 }
114 }
115
116 createBoard()
117})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected