just a quick js version of uncle bob's bowling kata