Update Recursion.md

This commit is contained in:
Angelos Chalaris
2018-07-17 21:04:11 +03:00
committed by GitHub
parent 979f4bbca3
commit 1f11a227e7

View File

@ -1,3 +1,6 @@
### Recursion
Recursion is the repeated application of a process. In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base condition. The base condition breaks out of the recursion loop because otherwise the function would call itself indefinitely. Recursion is very useful when working with data structures that contain nesting where the number of levels deep is unknown.
Recursion is the repeated application of a process.
In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base condition.
The base condition breaks out of the recursion loop because otherwise the function would call itself indefinitely.
Recursion is very useful when working with nested data, especially when the nesting depth is dynamically defined or unkown.