-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3dae2b
commit 2a2ba3d
Showing
5 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var zoo = [ | ||
"Leão", | ||
"Girafa", | ||
"Tigre", | ||
"elefante", | ||
"Jacaré" | ||
] | ||
|
||
console.log(zoo); | ||
console.log(zoo[1]); | ||
|
||
|
||
//push() é usado para adicionar um elemento no final do seu array | ||
zoo.push("Cobra"); | ||
|
||
for(i = 0; i < zoo.length; i++){ | ||
console.log(`O animal na jaula ${i + 1} é o ${zoo[i]}`); | ||
} | ||
|
||
|
||
//zoo.forEach(animal => console.log(`O animal é o ${animal}`)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="pt-br"> | ||
|
||
<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>Tabuada</title> | ||
<style> | ||
body { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 24px; | ||
background-color: #0d47a1; | ||
color: white; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<script> | ||
|
||
nTabuada = prompt("Digite um número para a tabuada") | ||
tamanhoTabuada = prompt("Digite o tamanho da tabuada") | ||
|
||
var x = 0; | ||
document.body.innerHTML = `<h1>Tabuada do ${nTabuada}</h1>`; | ||
do { | ||
var resultado = nTabuada * (x + 1); | ||
document.body.innerHTML += `${nTabuada} * ${x + 1} = ${resultado} <br>` | ||
x++; | ||
} while (x < tamanhoTabuada); | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="pt-br"> | ||
<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>Tabuada</title> | ||
<style> | ||
body{ | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 24px; | ||
background-color: #0d47a1; | ||
color: white; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
nTabuada = prompt("Digite um número para a tabuada") | ||
tamanhoTabuada = prompt("Digite o tamanho da tabuada") | ||
|
||
document.body.innerHTML = `<h1>Tabuada do ${nTabuada}</h1>`; | ||
for(x = 0; x < tamanhoTabuada; x++){ | ||
resultado = nTabuada * (x+1) ; | ||
document.body.innerHTML += `${nTabuada} * ${x+1} = ${resultado} <br>` | ||
} | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html lang="pt-br"> | ||
|
||
<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>Tabuada</title> | ||
<style> | ||
body { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 24px; | ||
background-color: #0d47a1; | ||
color: white; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<script> | ||
|
||
nTabuada = prompt("Digite um número para a tabuada") | ||
tamanhoTabuada = prompt("Digite o tamanho da tabuada") | ||
|
||
var x = 0; | ||
while (x < tamanhoTabuada){ | ||
var resultado = nTabuada * (x + 1); | ||
document.body.innerHTML += `${nTabuada} * ${x + 1} = ${resultado} <br>` | ||
x++; | ||
} | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="pt-br"> | ||
|
||
<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>Jogo de Palavras</title> | ||
<style> | ||
body { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 24px; | ||
background-color: #0d47a1; | ||
color: white; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
#filmesDiv{ | ||
margin-top: 20px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<main> | ||
<h1>Bem vindo ao jogo dos Filmes!</h1> | ||
|
||
<h3>Troque uma palavra do nome dos filmes e veja o que acontece!</h3> | ||
|
||
<input type="text" id="palavra" placeholder="Digite uma palavra" /> <br /> | ||
<button onclick="muda_palavra()">Jogar</button> | ||
|
||
<div id="filmesDiv"></div> | ||
</main> | ||
|
||
|
||
<script> | ||
|
||
function muda_palavra() { | ||
palavra = document.getElementById('palavra').value; | ||
|
||
let filmes = [ | ||
`A hora do <b>${palavra}</b>`, | ||
`O <b>${palavra}</b> de OZ`, | ||
`11 homens e um <b>${palavra}</b>`, | ||
`<b>${palavra}</b> dos macacos`, | ||
`Procurando <b>${palavra}</b>` | ||
]; | ||
|
||
document.getElementById("filmesDiv").innerHTML = `${filmes.join('<br>')}` | ||
} | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |