Let’s add a loop, record hits in it and log them in the console.
- Add variable
victoryPoints, which will store
100, the number of points needed to win.
- Replace the loop stop condition to get the required number of points
total < victoryPoints.
- In the loop, log in the console the result of the shot from the variable