feature/algoritmos #1

Merged
caroline_moran merged 12 commits from feature/algoritmos into master 2022-10-28 13:25:52 +00:00
2 changed files with 11 additions and 4 deletions
Showing only changes of commit 755ff029e8 - Show all commits

View File

@ -1,4 +1,7 @@
export function fibonacci(value) {
// implementar logica aqui
}
if (value <= `${1}`) {
return value;
}
return fibonacci(value - 1) + fibonacci(value - 2);
}

View File

@ -1,4 +1,8 @@
export function sum(values) {
// implementar logica aqui
}
function add(a, b) {
return a + b;
}
var soma = values.reduce(add, 0);
return soma;
}