Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions semana2/loops/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!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">
<script src="index.js" defer></script>
<title>LOOPS</title>
</head>
<body>

</body>
</html>
21 changes: 21 additions & 0 deletions semana2/loops/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// //EXERCICIO 1 = O VALOR IMPRESSO EH 10.
// //EXERCICIO 2 - A = VAI IMPRIMIR OS NUMEROS MAIORES QUE 18.
// //EXERCICIO 2 - B = NAO É SUFICIENTE, EH NECESSARIO USAR let linha = ""
// //EXERCICIO 3 - VAI IMPRIMIR 4 LINHAS, CONTENDO EM CADA UM A QUANTIDADE DE * CORRESPONDENTE


const bichinhos = Number(prompt("Ola, quantos bichos de estimacao vc tem?"))
let quantosBichinhos = []

if (bichinhos === 0) {
console.log("que pena, vc pode adotar um pet")
}

for (i = 0; i < bichinhos; i++) {
const nomeBichinhos = prompt("Qual o nome dos bichinhos?")
quantosBichinhos.push(nomeBichinhos)
}
console.log(quantosBichinhos)