This file contains hidden or 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> | |
| <head> | |
| <title>Doc</title> | |
| </head> | |
| <body> | |
| <button id="nuevoitem">Añadir</button> | |
| <script src="./bundle.js"></script> |
This file contains hidden or 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
| class ItemList{ | |
| constructor(){ | |
| this.item = []; | |
| } | |
| addItem(){ | |
| this.item.push('Nuevo ítem'); | |
| console.log(this.item); | |
| } | |
| } |
This file contains hidden or 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
| [ | |
| { | |
| "equipo": "Arsenal", | |
| "liga": "Premier League" | |
| }, | |
| { | |
| "equipo": "Spurs", | |
| "liga": "Premier League" | |
| }, |
This file contains hidden or 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
| var each = require('foreach') | |
| var fs = require('fs') | |
| var content = fs.readFileSync('./data/static/teams.json', 'utf-8') | |
| var ligas = {} | |
| var equipos = JSON.parse(content) | |
| each([equipos], function (value, key, array) { | |
| for (var i = 0; i < value.length; i++) { | |
| ligas = value.reduce(function (key, item) { |
This file contains hidden or 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
| [ | |
| { | |
| "time_nome": "Arsenal", | |
| "liga_nome": "Premier League", | |
| "estadio": { | |
| "nome": "Emirates Stadium", | |
| "capacidade": "41631", | |
| "ingressos": [ | |
| "30", | |
| "35", |
This file contains hidden or 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
| var each = require('foreach'); | |
| var league = [ | |
| { | |
| "time": "São Paulo", | |
| "liga": "Brasil", | |
| "estadio": [ | |
| { | |
| "estadio_nome": "Morumbi", | |
| "capacidade": 60000 |
This file contains hidden or 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 http = require('http') | |
| const port = 3000 | |
| const ip = 'localhost' | |
| var fs = require('fs') | |
| var teams = 'data/static/teams.json' | |
| var matches = {}; | |
| const server = http.createServer((req, res) => { | |
This file contains hidden or 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 http = require('http') | |
| const port = 3000 | |
| const ip = 'localhost' | |
| var fs = require('fs') | |
| var teams = 'data/static/teams.json' | |
| var matches = {}; | |
| const server = http.createServer((req, res) => { | |
This file contains hidden or 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
| { | |
| "name": "Gabriel Meireles", | |
| "edad": 25, | |
| "ocupacion": "Desarollador Web", | |
| "especializaciones":{ | |
| "PHP":{ | |
| "Frameworks": [ | |
| "Zend Framework", "Codeigniter", "Laravel" | |
| ], | |
| "grado": "7 años" |
This file contains hidden or 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
| { | |
| "liga":{ | |
| "Premier League":{ | |
| "Chelsea":{ | |
| "estadio":{ | |
| "nombre": "Stamford Bridge", | |
| "capacidad": 41631, | |
| "entradas":{ | |
| "sector 1": 30, | |
| "sector 2": 45, |