Skip to content

Commit 78a6ffa

Browse files
authored
Update article.md
Change to wording about maximum recursion depth.
1 parent 8c30654 commit 78a6ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/01-recursion/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function pow(x, n) {
9696
9797
The maximal number of nested calls (including the first one) is called *recursion depth*. In our case, it will be exactly `n`.
9898
99-
The maximal recursion depth is limited by JavaScript engine. We can make sure about 10000, some engines allow more, but 100000 is probably out of limit for the majority of them. There are automatic optimizations that help alleviate this ("tail calls optimizations"), but they are not yet supported everywhere and work only in simple cases.
99+
The maximal recursion depth is limited by JavaScript engine. We can rely on it being 10000, some engines allow more, but 100000 is probably out of limit for the majority of them. There are automatic optimizations that help alleviate this ("tail calls optimizations"), but they are not yet supported everywhere and work only in simple cases.
100100
101101
That limits the application of recursion, but it still remains very wide. There are many tasks where recursive way of thinking gives simpler code, easier to maintain.
102102

0 commit comments

Comments
 (0)