From 12e0958f8ab1e817d3d10acc724a6eb1a5d783e5 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 7 Apr 2022 22:46:02 -0300 Subject: [PATCH 1/8] Revisao funcao js --- revisao/funcao-js/index.html | 13 +++++++++ revisao/funcao-js/index.js | 52 ++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 revisao/funcao-js/index.html create mode 100644 revisao/funcao-js/index.js diff --git a/revisao/funcao-js/index.html b/revisao/funcao-js/index.html new file mode 100644 index 0000000..82ae26e --- /dev/null +++ b/revisao/funcao-js/index.html @@ -0,0 +1,13 @@ + + + + + + + + Documents + + + + + \ No newline at end of file diff --git a/revisao/funcao-js/index.js b/revisao/funcao-js/index.js new file mode 100644 index 0000000..2113e79 --- /dev/null +++ b/revisao/funcao-js/index.js @@ -0,0 +1,52 @@ +//Exercicio de Interpretação +//1.A) Será impresso o valor de 2*5=10 e 2*10=20 +//1.B) Não apareceria nada no console +//2.A) A função deixa o texto de entrada todo em minúsculo e determina em boolean se ele contém a frase "cenoura" +//2.B) True, , True, false + +const exercicio1A = () =>{ + console.log('Eu sou Rene, tenho 22 anos, moro em Rio de Janeiro e sou estudante') + +} +const exercicio1B = (name, age, city,job) =>{ + console.log(`My name is ${name}, I'm ${age} years old, I live in ${city} and I'm an ${job}`) + +} +const exercicio2A = (a,b) =>{ + return console.log(a+b) + +} +const exercicio2B = (a,b) =>{ + return console.log(a>b) + +} +const exercicio2C = (a) =>{ + let resultado = a%2 + return console.log(resultado===0) + + +} +const exercicio2D = (frase) =>{ + return console.log(frase.toUpperCase(), frase.length) + +} +const exercicio3 = (a,b) =>{ + console.log(`Números inseridos ${a} e ${b}`) + const soma = () =>{ + return console.log('Adição', a+b) + } + const sub = () =>{ + return console.log("Subtração",a-b) + } + const mult = () =>{ + return console.log('Mult', a*b) + } + const divis = () =>{ + return console.log('Divisão', a/b) + } + soma() + sub() + mult() + divis() + +} From 83378020514e13f16911b93796dbd1d27f82a91e Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 8 Apr 2022 22:28:20 -0300 Subject: [PATCH 2/8] Lista de Revisao JS 1 --- revisao/lista-revisao/.DS_Store | Bin 0 -> 6148 bytes revisao/lista-revisao/exercicios.js | 112 ++++++++++++++++++++++++++++ revisao/lista-revisao/index.html | 14 ++++ revisao/lista-revisao/tests.js | 35 +++++++++ 4 files changed, 161 insertions(+) create mode 100644 revisao/lista-revisao/.DS_Store create mode 100644 revisao/lista-revisao/exercicios.js create mode 100644 revisao/lista-revisao/index.html create mode 100644 revisao/lista-revisao/tests.js diff --git a/revisao/lista-revisao/.DS_Store b/revisao/lista-revisao/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4e0e062580a34cec9a193a91cf0f29dbff08b292 GIT binary patch literal 6148 zcmeHK%}N774E~}$6!p-f7h#^D;2SKZ9z6R3S}Uk*t*{k5&fSOc5%tTD;;wrX5lJBV z(n&J2^Fe1O0A%sBJ_Tj~rc^~yXGC;(G_)7V`$Vxho-xNQcG#dDndmPL>9-%?4i8x4 z24BAayxm@}+U<&QCFhkoe>0({gzT8#(RSSPJ-U9roDA}hhWV`8;0lj}x|cznu9cDu zBm>DnGLQ`XBm=y&Ri=lIX_J9uAQ|{%K+lIlRcr#Qqa7VI)&dYG95$h^&thy)R{^_x~CH zGNVntrKCv)l7auqfJ~Mb%LR8Ack8!(>Rnr?msAzatLjkb_Z|WKq36i41wCHWXI>Ln V9d#BRw{l`W1dNb0$-pl#@D54OHYET6 literal 0 HcmV?d00001 diff --git a/revisao/lista-revisao/exercicios.js b/revisao/lista-revisao/exercicios.js new file mode 100644 index 0000000..35143d4 --- /dev/null +++ b/revisao/lista-revisao/exercicios.js @@ -0,0 +1,112 @@ +// EXEMPLOS DE IMPLEMENTAÇÃO --------------------------------------------------------------- + +// EXERCÍCIO 0A +function soma(num1, num2) { + // implemente sua lógica aqui + return num1 + num2 +} + +// EXERCÍCIO 0B +function imprimeMensagem() { + // implemente sua lógica aqui + const mensagem = prompt('Digite uma mensagem!') + + console.log(mensagem) +} + +// EXERCÍCIOS PARA FAZER ------------------------------------------------------------------ + +// EXERCÍCIO 01 +function calculaAreaRetangulo() { + let altura = prompt(Number('Altura')) + let largura = prompt(Number('Largura')) + return console.log(altura*largura) + + +} + +// EXERCÍCIO 02 +function imprimeIdade() { + let atual = prompt(Number('Ano Atual')) + let nasc = prompt(Number('Ano Nascimento')) + return console.log(atual-nasc) + +} + +// EXERCÍCIO 03 +function calculaIMC(peso, altura) { + return peso/(altura*altura) + +} + +// EXERCÍCIO 04 +function imprimeInformacoesUsuario() { + let nome = prompt('') + let idade = prompt('') + let email = prompt('') + return console.log(`Meu nome é ${nome}, tenho ${idade} anos, e o meu email é ${email}.`) + // "Meu nome é NOME, tenho IDADE anos, e o meu email é EMAIL." + +} + +// EXERCÍCIO 05 +function imprimeTresCoresFavoritas() { + let cor1 = prompt('Qual sua Cor favorita?') + let cor2 = prompt('Qual sua Cor favorita?') + let cor3 = prompt('Qual sua Cor favorita?') + return console.log(`${cor1}, ${cor2}, ${cor3}`) + + +} + +// EXERCÍCIO 06 +function retornaStringEmMaiuscula(string) { + return string.toUpperCase() +} + +// EXERCÍCIO 07 +function calculaIngressosEspetaculo(custo, valorIngresso) { + return custo/valorIngresso +} + +// EXERCÍCIO 08 +function checaStringsMesmoTamanho(string1, string2) { + return string1.length===string2.length +} + +// EXERCÍCIO 09 +function retornaPrimeiroElemento(array) { + return array[0] +} + +// EXERCÍCIO 10 +function retornaUltimoElemento(array) { + return array[array.length-1] +} + +// EXERCÍCIO 11 +function trocaPrimeiroEUltimo(array) { + + +} + +// EXERCÍCIO 12 +function checaIgualdadeDesconsiderandoCase(string1, string2) { + return string1.toUpperCase()===string2.toUpperCase() + +} + +// EXERCÍCIO 13 +function checaRenovacaoRG() { + +} + +// EXERCÍCIO 14 +function checaAnoBissexto(ano) { + +} + +// EXERCÍCIO 15 +function checaValidadeInscricaoLabenu() { + +} \ No newline at end of file diff --git a/revisao/lista-revisao/index.html b/revisao/lista-revisao/index.html new file mode 100644 index 0000000..7d33eda --- /dev/null +++ b/revisao/lista-revisao/index.html @@ -0,0 +1,14 @@ + + + + + + + + + Document + + +
+ + \ No newline at end of file diff --git a/revisao/lista-revisao/tests.js b/revisao/lista-revisao/tests.js new file mode 100644 index 0000000..3c06be9 --- /dev/null +++ b/revisao/lista-revisao/tests.js @@ -0,0 +1,35 @@ +!function(e,n,t,r,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof o.parcelRequire9b95&&o.parcelRequire9b95,u=l.cache||{},i="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,t){if(!u[n]){if(!e[n]){var r="function"==typeof o.parcelRequire9b95&&o.parcelRequire9b95;if(!t&&r)return r(n,!0);if(l)return l(n,!0);if(i&&"string"==typeof n)return i(n);var a=new Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){return e[n][1][t]||t},f.cache={};var c=u[n]=new s.Module(n);e[n][0].call(c.exports,f,c,c.exports,this)}return u[n].exports;function f(e){return s(f.resolve(e))}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=l,s.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return o.parcelRequire9b95}}),o.parcelRequire9b95=s;for(var c=0;c{const{getTestResult:e,setTestResult:n}=b.useTestResults(),[t,r]=u.useState(null);return i.default.createElement("div",null,i.default.createElement(p.Heading,null),i.default.createElement("hr",null),i.default.createElement("div",{style:{display:"flex"}},i.default.createElement(m.TestsSelect,{tests:v,selectedTest:t,setSelectedTest:r,getTestResult:e})),t?i.default.createElement(h.TestRunner,{test:t,setTestResultGlobal:n}):i.default.createElement(g.AllTestsRunner,{tests:v}))},w=document.createElement("style");w.textContent=c.default,document.querySelector("head").appendChild(w),l.default.render(i.default.createElement(y,null),document.getElementById("root"))},{"../core/types":"4XE9t","react-dom":"1FapN",react:"3lC58","bundle-text:./water.css":"6xekz","../core/validators":"4w5y8","./components/Heading":"PT9Wn","./components/TestsSelect":"4sjzY","./components/TestRunner":"3swYc","./components/AllTestsRunner":"5sFQ0","./hooks/useTestResults":"5bxix","@parcel/transformer-js/lib/esmodule-helpers.js":"1rdR8"}],"4XE9t":[function(e,n,t){var r=e("@parcel/transformer-js/lib/esmodule-helpers.js");let a;r.defineInteropFlag(t),r.export(t,"INPUT_TYPES",(function(){return a})),function(e){e.FUNCTION_ARGS="FUNCTION_ARGS",e.PROMPT="PROMPT"}(a||(a={}))},{"@parcel/transformer-js/lib/esmodule-helpers.js":"1rdR8"}],"1rdR8":[function(e,n,t){"use strict";t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,n){return Object.keys(e).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in n&&n[t]===e[t]||Object.defineProperty(n,t,{enumerable:!0,get:function(){return e[t]}}))})),n},t.export=function(e,n,t){Object.defineProperty(e,n,{enumerable:!0,get:t})}},{}],"1FapN":[function(e,n,t){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),n.exports=e("./cjs/react-dom.production.min.js")},{"./cjs/react-dom.production.min.js":"7q6tI"}],"7q6tI":[function(e,n,t){ +/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +"use strict";var r=e("react"),a=e("object-assign"),o=e("scheduler");function l(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t