js/app.js
/**
 * @description Takes the shuffled card as array and puts it back in the page grid
 * Also removes classes added to cards for opening, closing and animations
 * @param cardArray
 */
@description Takes the shuffled card as array and puts it back in the page grid
Also removes classes added to cards for opening, closing and animations
@param cardArray
@description Takes the shuffled card as array and puts it back in the page grid Also removes classes added to cards for opening closing and animations @param cardArray
function displayCards(cardArray) {
    const deckFragment = document.createDocumentFragment();
    cardArray.forEach(card => {
        card.classList.remove('match', 'open', 'show', 'no-match');
        deckFragment.appendChild(card)
    });
    deckHolder.appendChild(deckFragment);
}
function displayCards ( cardArray ) { const deckFragment = document . createDocumentFragment ( ) ; cardArray . forEach ( card => { card . classList . remove ( 'match' , 'open' , 'show' , 'no-match' ) ; deckFragment . appendChild ( card ) } ) ; deckHolder . appendChild ( deckFragment ) ; }
@description Takes the shuffled card as array and puts it back in the page grid
 Also removes classes added to cards for opening, closing and animations
 @param cardArray
@description Takes the shuffled card as array and puts it back in the page grid Also removes classes added to cards for opening closing and animations @param cardArray
//Doesn't improve performance much but added for hands-on on this concept and as a future proof //And it's always safe to do this way