Javascript for puzzle Conway's Game of Life