Each iteration, it [the loop] first runs the test function on the current loop value, and stops if that returns false. Then it calls the body function...
The first run of the loop returns true because the input value of the loop is 3 and the test function is n > 0. If you program the loop to check for a false value the loop never executes.
(I think!) to make the exercise work the body function needs to execute if the test function returns true.
The first run of the loop returns true because the input value of the loop is
3
and the test function isn > 0
. If you program the loop to check for a false value the loop never executes.(I think!) to make the exercise work the body function needs to execute if the test function returns true.