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

8 lines
157 B
JavaScript
Raw Normal View History

export function maxValue(values) {
// implementar logica aqui
2022-10-27 19:18:04 +00:00
let res = Math.max(...values)
if (values.length === 0){
return 0
}
return res
}