Disclaimer: I'm very new to JS

Hi all,

I'm working on a card game for the web browser and in the console I'm supposed to get the following:

```
// User flipped queen
// images/queen-of-hearts.png
// hearts
// User flipped king
// images/king-of-hearts.png
// hearts

```

The only message I'm seeing in the console is "up and running" (see the code below).

I'm also supposed to get the following pop up:

> 
> "This page says: Sorry, try again."
> 
> 
> 

After following the (pretty vague) posted instructions, browsing my course group's Slack posts, and trial and error, I haven't gotten anywhere. So I thought I'd post my code to stackoverflow to see if anyone spots something I missed or if something's in the wrong place.

Thanks! Here's the code:

```
console.log('up and running');

var cards = [

{
rank: 'queen',
suit: 'hearts',
cardImage: 'images/queen-of-hearts.png',
},

{
rank: 'queen',
suit: 'diamonds',
cardImage: 'images/queen-of-diamonds.png',
},

{
rank: 'king',
suit: 'hearts',
cardImage: 'images/king-of-hearts.png',
},

{
rank: 'king',
suit: 'diamonds',
cardImage: 'images/king-of-diamonds.png'
}

];

var cardsInPlay = [];

var flipCard = function() {
    console.log("User flipped " + cards[cardId].rank);

    console.log(cards[cardId].cardImage);
    console.log(cards[cardId].suit);

    cardsInPlay.push(cards[cardId].rank);

}

var checkForMatch = function() {
    if (cardsInPlay.length === 2) {
        if (cardsInPlay[0] === cardsInPlay[1]) {
                alert('You found a match!');
            } else {
                alert('Sorry, try again.');
    };  
};
};

checkForMatch();

```