forked from MateusAugustoFerreira/exercicio-js-turma-tarde
-
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
Showing
6 changed files
with
127 additions
and
1 deletion.
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,18 @@ | ||
let capivara = { | ||
altura: "60cm", | ||
peso: "7 toneladas", | ||
habitat: "floresta", | ||
cor: "vermelha", | ||
especie: "mamífero", | ||
|
||
andar:function () { | ||
console.log("pak pak pak pak") | ||
}, | ||
comer:function () { | ||
console.log("nhac nhac nhac") | ||
}, | ||
correr:function (){ | ||
console.log("zunnnn.. zunnnnn.. iunnnnnn") | ||
} | ||
} | ||
console.log(" A capivara tem " + capivara.altura + " pesa " + capivara.peso + " seu habitat natural é " + capivara.habitat + " da cor " + capivara.cor + " da espécie " + capivara.especie) |
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 @@ | ||
let arrayCarros = ["joao", "lyara", "raysson", "luiz", "julio", "pedro"]; | ||
|
||
console.log(arrayCarros); | ||
|
||
|
||
|
||
|
||
// arrayCarros.unshift("cavalo"); | ||
// arrayCarros.shift("cavalo"); | ||
// arrayCarros.push("cavalo"); botar no final | ||
// arrayCarros.pop(); retirar | ||
|
||
|
||
// let indice = arrayCarros.indexOf("chevete") achar posicao! |
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 @@ | ||
let p = 300; | ||
let a = 1.94; | ||
let imc = p / (a*a); | ||
|
||
|
||
if (imc<18.5){ | ||
console.log("Você está abaixo do peso " + imc); | ||
} else if((imc>=18.5) && (imc<=24.9)) { | ||
console.log("Você está no peso normal " + imc); | ||
} else if((imc>=25) && (imc<=29.9)) { | ||
console.log("Você está sobrepeso " + imc); | ||
} else if((imc>=30) && (imc<=34.9)) { | ||
console.log("Você está com obesidade GRAU II " + imc); | ||
} else if((imc>=35) && (imc<=39.9)) { | ||
console.log("Você está com obesidade GRAU II " + imc); | ||
} else if (imc>40) { | ||
console.log("Você está com obesidade GRAU III" + imc); | ||
} |
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
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,34 @@ | ||
// var car = { | ||
// fabricante:"chevrolet", | ||
// modelo:"corsa", | ||
// peso:"1500kg" | ||
// } | ||
|
||
// console.log(" fabricante " + car.fabricante) | ||
|
||
// let truck = { | ||
// fabricante: "scania", | ||
// modelo: "8440", | ||
// peso: "10300kg", | ||
// ligado:false, | ||
|
||
// ligar:function () { | ||
// this.ligado = true | ||
// console.log(" o caminhao " + this.modelo + " está ligando... "); | ||
// console.log("start vrum vrum vrummmmmm"); | ||
// }, | ||
|
||
// acelerar:function () { | ||
// if (this.ligado == true) { | ||
// console.log(" o caminhão " + this.modelo + " está ligando ") | ||
// console.log(" vrum vrum vrum vrum ") | ||
// } | ||
// } | ||
// } | ||
|
||
// let cars = [ | ||
// {fabricante:"fiat" , modelo: ,} | ||
// {fabricante: "toyota", modelo: ,} | ||
// {fabricante: , modelo: ,} | ||
// {fabricante: , modelo: ,} | ||
// ] |
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 @@ | ||
let formaPagamento = "credito"; | ||
let valorTotal = 2000; | ||
let saldo = 4000; | ||
let parcela = 5 | ||
|
||
switch (formaPagamento) { | ||
case "pix": | ||
valorTotal =valorTotal - valorTotal/10 | ||
console.log("Você pagara " + valorTotal) | ||
break; | ||
|
||
case "debito": | ||
if (saldo >= valorTotal){ | ||
console.log("você pagara " + valorTotal) | ||
} else if (saldo <= valorTotal) | ||
console.log(" saldo insuficiente ") | ||
break; | ||
|
||
case "credito": | ||
if (parcela <=1){ | ||
valorTotal = (valorTotal * 0.05) + valorTotal | ||
console.log(" você pagara " + valorTotal ) | ||
} | ||
|
||
break; | ||
case "cartao": | ||
|
||
|
||
break; | ||
case "carne": | ||
|
||
|
||
break; | ||
default: | ||
break; | ||
} |