Simple Memory Game in JavaScript