Source Code
// fibinacci recursive
const a = []
const fibo = (i, max, arr)=>{
if(i<=1) return fibo(i+1,max,[...arr,1])
else if(i<max) return fibo(i+1,max,[...arr,arr[i-2]+arr[i-1]])
else return arr
}
const b = fibo(0,25,[])
console.log(b)
Source Code
// fibinacci recursive
const a = []
const fibo = (i, max, arr)=>{
if(i<=1) return fibo(i+1,max,[...arr,1])
else if(i<max) return fibo(i+1,max,[...arr,arr[i-2]+arr[i-1]])
else return arr
}
const b = fibo(0,25,[])
console.log(b)