Answers for "fibonacci sequence array"

-1

fibonacci sequence array

function fib(n){  let arr = [0, 1];  for (let i = 2; i < n + 1; i++){    arr.push(arr[i - 2] + arr[i -1])  } return arr[n]}
Posted by: Guest on April-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language