quero saber como criar um jogo da memoria em javascript. codigo que fiz até agora: <head>
<title>Jogo da velha</title>
<script>
function images() {
var imagens = new array(2)
imagens[0]= smile.gif
imagens[1]= sad.gif
if(imagens[0]>imagens[1])
{ alert(você perdeu) }
else{
alert(você ganhou um par)
}
}
</script>
</head>
<body>
<input type="button" value="?" onclick="function images(if,imagens[0])"><input type="button" value="?" onclick="function images(if,imagens[1])">
<br>
<input type="button" value="?" onclick="function images(if,imagens[1])"><input type="button" value="?" onclick="function images(if,imagens[0])">
</body> tem aquele bug chato de não aparecer a imagem no botão