let numeros = [1,2,3,4,5];
let maior = numeros[0];
let menor = numeros[0];
for (let numero of numeros) {
if(numero > maior) maior = numero;
if(numero < menor) menor = numero;
};
console.log(maior);
console.log(menor);
console.log("")
let menor2 = Math.min(...numeros);
console.log(menor2);
let maior2 = Math.max(...numeros);
console.log(maior2);
To embed this project on your website, copy the following code and paste it into your website's HTML: