export function maxValue(values) { // implementar logica aqui var maior = -1; for (var i = 0; i < values.length; i++) { if (values[i] > maior) { maior = values[i]; } } return maior } // Resultados esperados console.log(maxValue([4, 6, 12, 5]), 12); // 12 console.log(maxValue([9, 234, 312, 999, 21, 2311]), 2311); // 2311 console.log(maxValue([533, 234, 23423, 32, 432]), 23423); // 23423 console.log(maxValue([5, 4, 3, 2, 1]), 5); // 5 console.log(maxValue([-1, -5, -10, -45]), -1); // -1