-
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
Gustavo Alves
committed
Sep 13, 2021
1 parent
a8d31f2
commit affcacc
Showing
26 changed files
with
359 additions
and
283 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,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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Funçoes</title> | ||
</head> | ||
<body> | ||
<script src="main.js"></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,18 @@ | ||
// function saudacao(nome) { | ||
// console.log(`Bom dia ${nome}`) | ||
// } | ||
|
||
// saudacao('Gustavo'); | ||
|
||
// const variavel = saudacao('Gustavo') | ||
|
||
const soma = (x, y) => { | ||
return x + y; | ||
}; | ||
console.log(soma(40, 20)); | ||
|
||
const raiz = (n) => { | ||
return n ** 0.5; | ||
}; | ||
|
||
console.log(raiz(10)); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
# JavaScript-Udemy | ||
# JavaScript-Udemy |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio Math e Numbers</title> | ||
</head> | ||
<body> | ||
<script src="main.js"></script> | ||
</body> | ||
</html> | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio Math e Numbers</title> | ||
</head> | ||
<body> | ||
<script src="main.js"></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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// ARRAY == lista de dados ordenada | ||
|
||
const alunos = ["Gustavo", "Luiz", "Maria"]; | ||
|
||
alunos.push(2); | ||
alunos.unshift("Leleco"); | ||
alunos[2] = "Eduardo"; | ||
alunos.pop(); | ||
console.log(alunos.slice(0, -3)); | ||
|
||
const rm = alunos.pop(); | ||
console.log(rm); | ||
// ARRAY == lista de dados ordenada | ||
|
||
const alunos = ["Gustavo", "Luiz", "Maria"]; | ||
|
||
alunos.push(2); | ||
alunos.unshift("Leleco"); | ||
alunos[2] = "Eduardo"; | ||
alunos.pop(); | ||
console.log(alunos.slice(0, -3)); | ||
|
||
const rm = alunos.pop(); | ||
console.log(rm); |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio com variaveis</title> | ||
</head> | ||
<body> | ||
<div class="ex"> | ||
<input type="text" /> | ||
<button onclick="ver()">ver</button> | ||
<h1></h1> | ||
</div> | ||
|
||
<script src="main.js"></script> | ||
</body> | ||
</html> | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio com variaveis</title> | ||
</head> | ||
<body> | ||
<div class="ex"> | ||
<input type="text" /> | ||
<button onclick="ver()">ver</button> | ||
<h1></h1> | ||
</div> | ||
|
||
<script src="main.js"></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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
|
||
// function ver(){ | ||
// const nome = document.querySelector('input').value | ||
// let el = document.querySelector(".ex") | ||
|
||
// el.innerHTML = `<p>Seu nome é ${nome}</p>` | ||
// el.innerHTML += `<p>Seu nome tem ${nome.length} letras</p>` | ||
// el.innerHTML += `<p>A segunda letra do seu nome é ${nome[1]}</p>` | ||
|
||
// el.innerHTML += `<p>As ultimas 3 letras do seu nome são ${nome.slice(-3)}</p>` | ||
// el.innerHTML += `<p>As palavras do seu nome são ${nome.split(', ')}</p>`; | ||
// el.innerHTML += `<p>Seu nome com letras maiuscula ${nome.toUpperCase()}</p>`; | ||
// el.innerHTML += `<p>Seu nome com letras mainusculas ${nome.toLocaleLowerCase()}</p>`; | ||
|
||
// } | ||
|
||
|
||
|
||
function ver(){ | ||
const nome = document.querySelector('input').value | ||
let el = document.querySelector(".ex") | ||
|
||
el.innerHTML = `<h2>${nome} é gente boa</h2>`; | ||
|
||
if(nome == 'Juliano'){ | ||
el.innerHTML = `<h2>${nome} é viado</h2>`; | ||
} | ||
|
||
// function ver(){ | ||
// const nome = document.querySelector('input').value | ||
// let el = document.querySelector(".ex") | ||
|
||
// el.innerHTML = `<p>Seu nome é ${nome}</p>` | ||
// el.innerHTML += `<p>Seu nome tem ${nome.length} letras</p>` | ||
// el.innerHTML += `<p>A segunda letra do seu nome é ${nome[1]}</p>` | ||
|
||
// el.innerHTML += `<p>As ultimas 3 letras do seu nome são ${nome.slice(-3)}</p>` | ||
// el.innerHTML += `<p>As palavras do seu nome são ${nome.split(', ')}</p>`; | ||
// el.innerHTML += `<p>Seu nome com letras maiuscula ${nome.toUpperCase()}</p>`; | ||
// el.innerHTML += `<p>Seu nome com letras mainusculas ${nome.toLocaleLowerCase()}</p>`; | ||
|
||
// } | ||
|
||
|
||
|
||
function ver(){ | ||
const nome = document.querySelector('input').value | ||
let el = document.querySelector(".ex") | ||
|
||
el.innerHTML = `<h2>${nome} é gente boa</h2>`; | ||
|
||
if(nome == 'Juliano'){ | ||
el.innerHTML = `<h2>${nome} é viado</h2>`; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
.ex{ | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
position: absolute; | ||
color: rgb(0, 0, 0); | ||
top: 50%; left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.ex input{ | ||
outline: 0; | ||
margin-bottom: 10px; | ||
.ex{ | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
position: absolute; | ||
color: rgb(0, 0, 0); | ||
top: 50%; left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.ex input{ | ||
outline: 0; | ||
margin-bottom: 10px; | ||
} |
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio Math e Numbers</title> | ||
</head> | ||
<body> | ||
|
||
<section> | ||
<h1>O seu numero é: <span id='num'></span></h1> | ||
<div id="texto"> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
</div> | ||
</section> | ||
|
||
<script src="main.js"></script> | ||
</body> | ||
</html> | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio Math e Numbers</title> | ||
</head> | ||
<body> | ||
|
||
<section> | ||
<h1>O seu numero é: <span id='num'></span></h1> | ||
<div id="texto"> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
</div> | ||
</section> | ||
|
||
<script src="main.js"></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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
const numero = Number(prompt('Digite um numero')); | ||
const numeroTitulo = document.getElementById('num'); | ||
const texto = document.getElementById('texto'); | ||
|
||
numeroTitulo.innerHTML = numero; | ||
texto.innerHTML = `<p>Raiz quadrada ${numero ** 0.5}</p>` | ||
texto.innerHTML += `<p>seu numero -2 é ${numero - 2}</p>` | ||
texto.innerHTML += `<p>${numero} é um numero inteiro? ${Number.isInteger(numero)}</p>` | ||
texto.innerHTML += `<p>È NaN? ${isNaN(numero)}</p>` | ||
texto.innerHTML += `<p>Arredondando para baixo ${Math.floor(numero)}</p>` | ||
texto.innerHTML += `<p>Arredodano para cima ${Math.ceil(numero)}</p>` | ||
const numero = Number(prompt('Digite um numero')); | ||
const numeroTitulo = document.getElementById('num'); | ||
const texto = document.getElementById('texto'); | ||
|
||
numeroTitulo.innerHTML = numero; | ||
texto.innerHTML = `<p>Raiz quadrada ${numero ** 0.5}</p>` | ||
texto.innerHTML += `<p>seu numero -2 é ${numero - 2}</p>` | ||
texto.innerHTML += `<p>${numero} é um numero inteiro? ${Number.isInteger(numero)}</p>` | ||
texto.innerHTML += `<p>È NaN? ${isNaN(numero)}</p>` | ||
texto.innerHTML += `<p>Arredondando para baixo ${Math.floor(numero)}</p>` | ||
texto.innerHTML += `<p>Arredodano para cima ${Math.ceil(numero)}</p>` | ||
texto.innerHTML += `<p>Com dua casas decimais ${numero.toFixed(2)}</p>` |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio com variaveis</title> | ||
</head> | ||
<body> | ||
</div> | ||
<script src="main.js"></script> | ||
</body> | ||
</html> | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Exercicio com variaveis</title> | ||
</head> | ||
<body> | ||
</div> | ||
<script src="main.js"></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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
let num1 = 9.54578; | ||
let arr = Math.floor(num1); | ||
let arr2 = Math.ceil(num1); | ||
console.log(arr, arr2); | ||
|
||
// Math.floor == arredonda pra baixo | ||
// Math.ceil == arredonda pra cima | ||
|
||
let num2 = Math.round(2.5); | ||
|
||
console.log(num2); | ||
console.log(Math.max(1, 2, 3, 4, 90, 39, 38493, 3444, 463636, 3463643, 332535)) | ||
|
||
console.log(Math.random() * (10 - 5) + 5) // retorna um numero aleatorio entre 10 e 5 | ||
|
||
// Math.round == arredonda pra um numero mais proximo | ||
// Math.max == captura o maior numero | ||
// Math.min == captura o menor numero | ||
let num1 = 9.54578; | ||
let arr = Math.floor(num1); | ||
let arr2 = Math.ceil(num1); | ||
console.log(arr, arr2); | ||
|
||
// Math.floor == arredonda pra baixo | ||
// Math.ceil == arredonda pra cima | ||
|
||
let num2 = Math.round(2.5); | ||
|
||
console.log(num2); | ||
console.log(Math.max(1, 2, 3, 4, 90, 39, 38493, 3444, 463636, 3463643, 332535)) | ||
|
||
console.log(Math.random() * (10 - 5) + 5) // retorna um numero aleatorio entre 10 e 5 | ||
|
||
// Math.round == arredonda pra um numero mais proximo | ||
// Math.max == captura o maior numero | ||
// Math.min == captura o menor numero | ||
// Math.random == retorna um numero aleatorio |
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,14 @@ | ||
<!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" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Objetos</title> | ||
</head> | ||
<body> | ||
</div> | ||
<script src="main.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.