the game of life implemented in JavaScript