Put in order · JavaScript and TypeScript course · Module 12: Functional Programming

Elements of a Recursive Function

Arrange the elements of a correct recursive function in execution order:

Items to put in order

  • Check the base case (stop condition)
  • Call the function recursively with the simplified problem
  • If not - simplify the problem
  • If met - return the result directly

You can check the correct answer by solving this task in the CodeWorlds game.