conways name of life test in javascript