Uncle Bob’s The Bowling Game Kata in JavaScript