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

10 lines
234 B
JavaScript
Raw Normal View History

export function maxValue(values) {
// implementar logica aqui
2022-10-29 03:11:51 +00:00
var maiorNumero = 0;
if (values.length <1) {
maiorNumero = 0;
} else {
maiorNumero = Math.max.apply(Math,values) ;
}
return maiorNumero;
}