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

11 lines
144 B
JavaScript
Raw Permalink Normal View History

export function maxValue(values) {
if(values.length < 1){
return 0;
}
let maior = Math.max.apply(null, values)
return maior;
}