JS implementation of Conway`s life game