Simple JavaScript memory game - no frameworks