Just came across this beautiful solution on StackExchange through Hacker News and thought I would share it here since many of us have, or will have, done the Game of Life project on freeCodeCamp. It’s worth noting that a working implementation can be found here, as mentioned in the comments on the Hacker News post.
Have fun.