Memory game (javascript)

<html>
<head><meta charset="utf-8">
<title>Memroy card game</title>
</head>

<body>
<center>


<a href="#" onClick = "turn_card(0);"><img id="0" src ="card_cover.png" ></a>&nbsp;
<a href="#" onClick = "turn_card(1);"><img id="1" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(2);"><img id="2" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(3);"><img id="3" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(4);"><img id="4" src ="card_cover.png"></a>&nbsp;<br>
<a href="#" onClick = "turn_card(5);"><img id="5" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(6);"><img id="6" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(7);"><img id="7" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(8);"><img id="8" src ="card_cover.png"></a>&nbsp;
<a href="#" onClick = "turn_card(9);"><img id="9" src ="card_cover.png"></a>&nbsp;


<script>

 var card = new Array(10);


       card[0] = "b5.png";
       card[1] = "r1.png";
       card[2] = "b1.png";
       card[3] = "b2.png";
       card[4] = "r2.png";
       card[5] = "r3.png";
       card[6] = "r4.png";
       card[7] = "b3.png";
       card[8] = "r5.png";
       card[9] = "b4.png";

    var number = new Array(5, 1, 1, 2, 2, 3, 4, 3, 5, 4); //card number
    var ura_omote = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) //front and back flags
    var times = 0;      //Number of cards flipped

    var front_card_num = new Array ( 10, 10 );  //positions of flipped cards
number[5]=card[0],card[8];
number[4]=card[9], card[6];
number[3]=card[7],card[5];
number[2]=card[3],card[4];
number[1]=card[1],card[2];


 function turn_card (g) {
document.images[g].src=card[g];

}


</script>

</body>
</html>

am trying to write the code using if else statement.
I want the matching code and if not match code. help me please!

I don’t see any if statements you have tried to write yet. Have you tried writing out an algorithm for the logic needed?