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
<li>np-app</li> | |
<li>ng-model</li> | |
<li>ng-bind</li> | |
<li>ng-init</li> | |
<li>ng-controller (if exist ng-app :before it doest work!)</li> | |
<li>parent</li> | |
<li>ng-show</li> | |
<li>ng-hide</li> | |
<li>ng-if</li> |
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
const api = 'http://127.0.0.1/Dev/Javascript/JSON/my_local_json/dados2.json'; | |
async function essaurl(url){ | |
const response = await fetch(url); | |
const data = await response.json(); | |
if(response){ | |
show(data) | |
} |
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
busca2 = animais.filter((value)=> value.tipo === 'gato'); | |
busca2.length != 0 ? console.log(busca2) : console.warn('404') |
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
const n = [2,4,6,1,7]; | |
x = n.reduce(function (total,el,ind,arr) { | |
console.log(`index: ${ind}`) | |
console.log(`total: ${total}`) | |
console.log(`el: ${el}`) | |
console.log(`Arr: ${arr}`) | |
return total+= el; | |
},0); | |
console.log(x) //20 |
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
<!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"> | |
<title>Document</title> | |
<style> | |
code { | |
font-size: 2rem; |
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
//html | |
<input type="text" /> | |
<div id="esu"> | |
<span id="res"></span> | |
</div> | |
//css | |
#esu{ | |
display: none; |
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
const api = "https://gh-pinned-repos.egoist.sh/?username=geraldotech"; | |
loadE = document.querySelector("#loading"); | |
container = document.querySelector("#container"); | |
async function get(url){ | |
response = await fetch(url) | |
console.log(response) | |
data = await response.json(); | |
console.log(data) |
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
//first class function | |
const ano = [1992,1995,2000,2006,2008]; | |
function idade(age){ | |
let d = new Date(); | |
return d.getFullYear() - age; | |
} | |
function Calc(ano,fun){ // declarando dois parâmetros, os anos e a função que calcula a idade baseado nos anos | |
let gets = []; // array vazio vai armazerar os resultados |
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
// get all questions || or gabarito answers | |
const title = document.querySelectorAll("[data-testid='question-typography']:first-child") | |
for(const i of title){ | |
console.log(i.textContent) | |
console.log("=============") | |
} | |
// get all questions || or gabarito answers com index | |
const title = document.querySelectorAll("[data-testid='question-typography']:first-child") | |
for(const [i, value] of title.entries()){ |
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
let [cont,sum,qt] = [1,0,2]; //contador, soma e quantidade de notas | |
while(cont <= qt){ | |
const notas = +prompt(`Digite a nota ${cont}`); | |
if(notas > 10) { alert('nota invalida!'); break; } // verifica se a nota for maior que 10 cancela a operacao | |
sum += (notas) //faz a soma | |
document.write(`Nota ${cont} => ${notas}`); | |
document.write('<br>'); | |
cont++; | |
} |
OlderNewer