Highlight key points in articles
This commit is contained in:
@ -10,7 +10,7 @@ excerpt: Recursion is a very important programming concept all developers should
|
||||
firstSeen: 2022-01-23T05:00:00-04:00
|
||||
---
|
||||
|
||||
Recursion is the repeated application of a process. In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base case. The base case breaks out of the recursion loop, thus allowing previous calls to the function to return a result. If no such case exists, the function will call itself indefinitely resulting in a stack overflow.
|
||||
Recursion is the **repeated application of a process**. In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base case. The base case breaks out of the recursion loop, thus allowing previous calls to the function to return a result. If no such case exists, the function will call itself indefinitely resulting in a stack overflow.
|
||||
|
||||
Recursion is used to solve problems where the solution depends on solutions to smaller instances of the same problem. A commonly-used example of a problem that can be solved recursively is the Fibonacci sequence:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user