Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,9 @@ More info: [MDN Reflect](https://developer.mozilla.org/en-US/docs/Web/JavaScript
Calls in tail-position are guaranteed to not grow the stack unboundedly. Makes recursive algorithms safe in the face of unbounded inputs.

```JavaScript
function factorial(n, acc = 1) {
function factorial(n, acc) {
'use strict';
if (acc == null) acc = 1;
if (n <= 1) return acc;
return factorial(n - 1, n * acc);
}
Expand Down