The game of Memory in JavaScript