recreating the game of darts in JavaScript using Jasmine for testing