feat(fibonacci): cria funcao de fibonacci #4

Merged
ViniciusDeniz merged 1 commits from feature/fibonacci into master 2022-11-02 20:43:40 +00:00

View File

@ -1,4 +1,11 @@
export function fibonacci(value) {
// implementar logica aqui
let f = [];
f[0] = 0;
f[1] = 1;
for (n = 2; n <= value; n++) {
f[n] = f[n - 1] + f[n - 2];
}
return f[value];
}