Generation

generate functionSun, 13 Nov 2022

fibonacci function

const fibonacci = num => { if (num <= 1) return 1; return fibonacci(num - 1) + fibonacci(num - 2); } fibonacci(4) // 3

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant