Game Of Life implementation in pure JavaScript