forked from M3-Academy/challenge-algorithms-v2.0
Retornando fibonacci
This commit is contained in:
parent
5aebe7e4f9
commit
5181e18b04
@ -1,4 +1,6 @@
|
||||
export function fibonacci(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
if(value < 2) {
|
||||
return value
|
||||
}
|
||||
return fibonacci(value - 1) + fibonacci(value - 2)
|
||||
}
|
Loading…
Reference in New Issue
Block a user