The Fibonacci sequence is a sequence of integers in which each term is the sum of the two preceding terms.
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
T Sudhish Nair -
Liam D. -
Subham Nandi -
dev.to staff -
Top comments (1)
const fib=n=>[...Array(n)].reduce((acc,val,i)=>acc.concat(i>1?acc[i-1]+acc[i-2]:i),[])