Mark As Completed Discussion

Turn around the situation

The final step is to make our solution iterative. With the previous (top-down) solution, we started with n and then repeatedly broke it down into smaller and smaller values until we reached n == 0 and n == 1. Instead, we will start with the base case and work our way up.

JAVASCRIPT
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment