fix: ajuste em teste de numeros negativos
This commit is contained in:
parent
da382aab6c
commit
66ffe9f4e4
@ -1,31 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
/*
|
||||
/*
|
||||
Faça um algoritmo que retorne o maior numero encontrado no array
|
||||
*/
|
||||
function maxValue(values) {
|
||||
// implementar logica aqui
|
||||
return 0
|
||||
}
|
||||
|
||||
// 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
|
||||
function maxValue(values) {
|
||||
// implementar logica aqui
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 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
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user