Last active
October 6, 2022 13:00
-
-
Save gydoma/cbe6d60f3edc036af9a59ccd7aca9f92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lista1 = new Array(10, -10, 20, 999, 30, -30); | |
var min = lista1[0]; | |
function minimum(lista, min){ | |
for(let i=0;i<lista.length; i++){ | |
if (lista[i] < min){ | |
min = lista[i]; | |
} | |
} | |
console.log("min: "+min); | |
} | |
minimum(lista1, min); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment