forked from M3-Academy/challenge-algorithms-v2.0
feat(maxValue): adicionando resolucao do desafio 3
maxValue
This commit is contained in:
parent
a6170f5d79
commit
39ef165e71
@ -1,4 +1,9 @@
|
||||
export function maxValue(values) {
|
||||
// implementar logica aqui
|
||||
if (values.length < 1) {
|
||||
return 0;
|
||||
}
|
||||
const maior = Math.max(...values);
|
||||
|
||||
return maior;
|
||||
}
|
Loading…
Reference in New Issue
Block a user