A game of life implementation in JavaScript