moringaman
11/13/2018 - 7:23 PM

fibonacciSequence.js

Recursive Fibonacci Sequence Number finder

function fibonacci(position) {
    if (position < 3) return 1
    else {
       return fibonacci(position -1) + fibonacci(position -2) 
    }
}

console.log(fibonacci(10))