Java Script Memory Game - School homework