JavaScript Game of Life