Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###Mini Golf Scores
- ####Exercise
- Bob, Jimbo and Fish love mini golf. But, like all good golfers they enjoy the 19th hole the most. Every time they hand in their score cards none of the scores are ever totalled. Write a function called ```totalScores``` in JS that calculates their scores and 'console.logs' the total for the club house.
- #####Bob
- > Hole 1 = 3
- > Hole 2 = 2
- > Hole 3 = 6
- > Hole 4 = 11
- > Hole 5 = 9
- > Hole 6 = 2
- > Hole 7 = 6
- > Hole 8 = 9
- > Hole 9 = 10
- #####Jimbo
- > Hole 1 = 5
- > Hole 2 = 12
- > Hole 3 = 9
- > Hole 4 = 22
- > Hole 5 = 13
- > Hole 6 = 7
- > Hole 7 = 16
- > Hole 8 = 10
- > Hole 9 = 11
- #####Fish
- > Hole 1 = 2
- > Hole 2 = 2
- > Hole 3 = 4
- > Hole 4 = 5
- > Hole 5 = 4
- > Hole 6 = 3
- > Hole 7 = 6
- > Hole 8 = 4
- > Hole 9 = 1
- ####Extension
- Now work out each golfers round compared to the course par.
- #####Par
- > Hole 1 = 3
- > Hole 2 = 4
- > Hole 3 = 5
- > Hole 4 = 5
- > Hole 5 = 3
- > Hole 6 = 3
- > Hole 7 = 4
- > Hole 8 = 3
- > Hole 9 = 5
- ####Ninja Extension
- Fish loves a punt. Having placed a $1 bet on each stroke over par that Bob and Jimbo played per hole calculate his winnings.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement