Match the Memes

Scope

Match the Memes was my first JavaScript project. It is a meme themed interactive desktop matching card game developed with the basic front-end technologies.

Technologies Used

  • HTML
  • SaSS
  • JavaScript
  • Git

Development

The following code snippet is the matching logic to check if first card and second card match

let correct = 0;
totalMatched = [];


function checkMatch(){
    if(firstChoice.dataset.image === secondChoice.dataset.image) {
        correct++    
        totalMatched.push(correct);
        total.innerHTML = correct;
        if(totalMatched.length == 6){           
            victory();
        };
        disableCards();
        
    } else {   
        unflip();
    }
}
Next Project
React Movie App