challenge-algorithms-v2.0-u.../03-maxValue/index.js

13 lines
186 B
JavaScript
Raw Permalink Normal View History

export function maxValue(values) {
// implementar logica aqui
let maxValor = Math.max(...values);
if (values == `${[]}`) {
return 0;
} else {
return maxValor;
}
}