Closed JoeDravarol closed 1 year ago
The code below should be refactor into its own function so that we can call it on game start or game reset.
// this function toggles the pokemon card on click let cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('click', ()=>{ if(!(card.classList.contains('visible'))){ card.className = 'card visible' }else{ card.classList = 'card' } }) })
The code below should be refactor into its own function so that we can call it on game start or game reset.