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

10 lines
234 B
JavaScript

export function maxValue(values) {
// implementar logica aqui
var maiorNumero = 0;
if (values.length <1) {
maiorNumero = 0;
} else {
maiorNumero = Math.max.apply(Math,values) ;
}
return maiorNumero;
}