forked from M3-Academy/challenge-algorithms-v2.0
18 lines
384 B
JavaScript
18 lines
384 B
JavaScript
export function maxValue(values) {
|
|
// implementar logica aqui
|
|
var maxValue = [10, 40, 30, 20, 50];
|
|
var maxValue = [10];
|
|
var maxValue = [30, 2, 1, -8];
|
|
var maxValue = [1, 2, 3, 4, 5, 10, 6, 7, 8, 9, ];
|
|
var max maior = maxValue value [0];
|
|
|
|
}
|
|
|
|
// interar o valor
|
|
for (var i=0; i < maxValue.length; i++){
|
|
if(maior < maxValue [i]){
|
|
maior = maxValue [i];
|
|
}
|
|
}
|
|
|
|
console.log(maior); |