game of life in Javascript