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

10 lines
194 B
JavaScript
Raw Normal View History

export function maxValue(values) {
// implementar logica aqui
2022-10-30 15:48:44 +00:00
let maxValor = Math.max(...values);
if (values == `${[]}`) {
return 0 ;
} else {
return maxValor;
}
}