forked from M3-Academy/challenge-algorithms-v2.0
feat(desafio): Adiciona quarta tarefa concluida
This commit is contained in:
parent
89dda96dfd
commit
f1125c7604
@ -1,4 +1,9 @@
|
|||||||
export function fibonacci(value) {
|
export function fibonacci(value) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
if(value < 2){
|
||||||
|
value = value;
|
||||||
|
}else{
|
||||||
|
value = fibonacci(value - 1) + fibonacci(value - 2);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user