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

8 lines
154 B
JavaScript

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