Conways game of life JS exercise