JSFiddle - React, Tailwind, and code Playground
by oti ext
JavaScript
function fib(index){
return f(1, 1, index);
}
function f(a, b, c){
if(c <= 2){
return a;
}
return f(a+b, a, c-1);
}
by oti ext
function fib(index){
return f(1, 1, index);
}
function f(a, b, c){
if(c <= 2){
return a;
}
return f(a+b, a, c-1);
}