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

8 lines
146 B
JavaScript
Raw Permalink Normal View History

export function maxValue(values) {
// implementar logica aqui
2022-10-31 16:50:14 +00:00
if (values.length == 0) {
return 0
}
2022-10-31 15:45:34 +00:00
return Math.max(...values);
2022-10-31 16:50:14 +00:00
}