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

9 lines
136 B
JavaScript

export function maxValue(values) {
// implementar logica aqui
if (values.length) {
return Math.max(...values)
}
return 0
}