challenge-algorithms-v2.0-g.../03-maxValue/readme.md
2022-10-27 11:07:13 -04:00

261 B

Desafio 03: Valor máximo

Faça um algoritmo que retorne o maior valor de um array de números.

Exemplo

maxValue([10, 40, 30, 20, 50]) // 50
maxValue([10]) // 10
maxValue([30, 2, 1, -8]) // 30
maxValue([1, 2, 3, 4, 5, 10, 6, 7, 8, 9, ]) // 10