return nth fibbonachi recursion javascript code example
Example: how to get nth fibonacci javascript
function nthFib(n) {
if(n <= 2) return n -1;
return nthFib(n - 2) + nthFib(n - 1);
}
function nthFib(n) {
if(n <= 2) return n -1;
return nthFib(n - 2) + nthFib(n - 1);
}