Skip to content

Commit bd18570

Browse files
committed
files added
1 parent 448baf8 commit bd18570

31 files changed

Lines changed: 1394 additions & 0 deletions

aula 12/ex011.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var idade = 61
2+
if (idade < 16){
3+
console.log('Não vota')
4+
} else if (idade <18 || idade >65){
5+
console.log('Voto opcional')
6+
} else{
7+
console.log('Voto Obrigatório')
8+
}

aula 12/ex012.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var agora = new Date()
2+
var hora = agora.getHours()
3+
console.log(`Agora são exatamente ${hora} horas.`)
4+
if(hora <12){
5+
console.log('Bom Dia!')
6+
} else if(hora <=18){
7+
console.log('Boa Tarde!')
8+
} else{
9+
console.log('Boa Noite')
10+
}

aula 12/ex013.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var agora = new Date()
2+
var diasem = agora.getDay()
3+
4+
/*
5+
0 - Domingo
6+
1 - Segunda
7+
2 - Terça
8+
3 - Quarta
9+
4 - Quinta
10+
5 - Sexta
11+
6 - Sábado
12+
*/
13+
14+
switch(diasem){
15+
case 0:
16+
console.log('Domingo')
17+
break
18+
case 1:
19+
console.log('Segunda')
20+
break
21+
case 2:
22+
console.log('Terça')
23+
break
24+
case 3:
25+
console.log('Quarta')
26+
break
27+
case 4:
28+
console.log('Quinta')
29+
break
30+
case 5:
31+
console.log('Sexta')
32+
break
33+
case 6:
34+
console.log('Sábado')
35+
break
36+
}
37+

aula04/ex001.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-br">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Javascript primeiro exercicio</title>
7+
</head>
8+
<style>
9+
body{
10+
background-color: rgb(105, 105, 173) ;
11+
color: white;
12+
font: normal 20pt arial;
13+
}
14+
</style>
15+
<body>
16+
<h1>Hello, World!</h1>
17+
<p>Estou livre da maldição</p>
18+
<script>
19+
window.alert('Rafael pagotti de lima Passou por aqui!')
20+
window.confirm('está gostando da resenhex?')
21+
var brainrot = window.prompt('Brainrot favorito?')
22+
window.alert(`Bem vindo fã do ${brainrot}!`)
23+
</script>
24+
</body>
25+
</html>

aula06/ex002.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-br">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Javascript primeiro exercicio</title>
7+
</head>
8+
<style>
9+
body{
10+
background-color: rgb(105, 105, 173) ;
11+
color: white;
12+
font: normal 20pt arial;
13+
}
14+
</style>
15+
<body>
16+
<h1>Hello, World!</h1>
17+
<p>Estou livre da maldição</p>
18+
<script>
19+
var n1 = Number.parseInt(window.prompt('Numero de brawlers que voce tem no brawl')) //string
20+
var n2 = Number.parseInt(window.prompt('Numero de Brainrots no index')) //string
21+
var s = n1 * n2
22+
window.alert(`Parabéns a sua aura é ${s}`) //concatenação
23+
// (number + number) para adição
24+
// (string + string) para concatenação
25+
</script>
26+
</body>
27+
</html>

aula06/ex003.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
<style>
8+
body{
9+
font: normal 20pt arial;
10+
}
11+
</style>
12+
</head>
13+
<body>
14+
15+
<script>
16+
var nome = window.prompt('Qual é seu nome?')
17+
document.write(`Seu nome tem ${nome.length} letras. <br>`)
18+
document.write(`Seu nome em maiúsculo é ${nome.toUpperCase()} <br>`)
19+
document.write(`Seu nome em minúsculo é ${nome.toLowerCase()}`)
20+
21+
/*
22+
$ node
23+
Welcome to Node.js v24.15.0.
24+
Type ".help" for more information.
25+
> var n1 = 176.67
26+
undefined
27+
> n1
28+
176.67
29+
> n1.toFixed(2).replace('.', ',')
30+
'176,67'
31+
> n1.toLocaleString('pt-BR',{style: 'currency', currency: 'BRL'})
32+
'R$ 176,67'
33+
*/
34+
</script>
35+
36+
</body>
37+
</html>

aula09/ex005.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html lang="pt-BR">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Primeiros passos com DOM</title>
7+
<style>
8+
body {
9+
font: arial 18pt helvetica;
10+
}
11+
12+
div {
13+
margin-bottom: 30px;
14+
}
15+
</style>
16+
</head>
17+
<body>
18+
<h1>Iniciando estudos com DOM</h1>
19+
<p>Aqui vai o resultado</p>
20+
<p>aprendendo a usar o <strong>DOM</strong> em Javascript</p>
21+
<div id="msg">Clique em mim</div>
22+
<script>
23+
var corpo = window.document.body;
24+
var p1 = window.document.getElementsByTagName("p")[0];
25+
var p2 = window.document.getElementsByTagName("p")[1];
26+
window.document.write(p1.innerText);
27+
window.document.write("<br>");
28+
window.document.write(p2.innerHTML);
29+
window.document.write("<br>");
30+
// var d = window.document.getElementById('msg')
31+
var d = window.document.querySelector('div#msg')
32+
d.style.background = 'green'
33+
d.innerText = 'estou aguardando...'
34+
</script>
35+
</body>
36+
</html>

aula10/ex006.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!doctype html>
2+
<html lang="pt-BR">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Eventod DOM</title>
7+
<style>
8+
div#area {
9+
font-family: Arial, Helvetica;
10+
font-size: 20pt;
11+
background-color: lightgray;
12+
color: black;
13+
width: 500px;
14+
height: 500px;
15+
line-height: 500px;
16+
text-align: center;
17+
margin: auto;
18+
}
19+
</style>
20+
</head>
21+
<body>
22+
<div id="area">Interaja...</div>
23+
24+
<script>
25+
var a = window.document.getElementById("area");
26+
a.addEventListener("click", clicar);
27+
a.addEventListener("mouseenter", entrar);
28+
a.addEventListener("mouseout", sair);
29+
30+
function clicar() {
31+
a.innerText = "Clicou!";
32+
a.style.background = "skyblue";
33+
}
34+
function entrar() {
35+
a.innerText = "Entrou!";
36+
a.style.background = "lightgreen";
37+
}
38+
function sair() {
39+
a.innerText = "Saiu!";
40+
a.style.background = "lightpink";
41+
}
42+
</script>
43+
</body>
44+
</html>

aula10/ex007.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-BR">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>somando numeros</title>
7+
<style>
8+
body{
9+
font: normal 18pt arial;
10+
}
11+
input{
12+
font: normal 18pt arial;
13+
margin-bottom: 40px;
14+
}
15+
</style>
16+
</head>
17+
<body>
18+
<h1>Somando Números</h1>
19+
<input type="number" name="txtn1" id="txtn1"> +
20+
<input type="number" name="txtn2" id="txtn2">
21+
<input type="button" value="Somar" onclick="somar()">
22+
<div class="res">Resultado</div>
23+
<script>
24+
function somar(){
25+
var tn1 = window.document.getElementById('txtn1')
26+
var tn2 = window.document.querySelector('input#txtn2')
27+
var res = window.document.querySelector('div.res')
28+
var n1 = Number(tn1.value)
29+
var n2 = Number(tn2.value)
30+
var s = n1 + n2
31+
res.innerHTML = `A soma entre ${n1} e ${n2} é igual a <strong>${s}</strong>`
32+
}
33+
</script>
34+
</body>
35+
</html>

aula11/ex008.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var vel = 47
2+
console.log(`A velocidade do seu carro é ${vel} km/h`)
3+
if(vel > 60) {
4+
console.log(`Você ultrapassou a velocidade permitida. MULTADO!`)
5+
}
6+
console.log(`Dirija sempre usando cinto de segurança!`)

0 commit comments

Comments
 (0)