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

8 lines
157 B
JavaScript

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