MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / fibonacci

Function fibonacci

Recursive/FibonacciNumberRecursive.js:9–14  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

7 */
8
9const fibonacci = (n) => {
10 if (n < 2) {
11 return n
12 }
13 return fibonacci(n - 2) + fibonacci(n - 1)
14}
15
16export { fibonacci }

Callers 2

Memoize.test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected