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
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
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 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
<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> |
NewerOlder