Bowling Game Kata in JS