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
$juegos = 'foo' //Lógica mediante la cual obtienes en primer lugar el juego | |
$juegos->each(function($juegos){ | |
$juegos->equipo_2; | |
}); | |
//Ya con esto puedes hacer lo siguiente: | |
$juego->equipo_2->foo; //Luego de un foreach. |
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 data = ( state, action ) => { | |
switch (action.type) { | |
case 'SEARCH_VIDEO': { | |
let results = []; | |
if (action.payload.query) { | |
const categories = state.data.categories | |
categories.map(category => { | |
let tempResults = category.playlist.filter(item => { | |
return item.author.toLowerCase().includes(action.payload.query.toLowerCase()) | |
}) |
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
(firstParam, secondParam, …, lastParam) => { statements } |
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
(a) => { return a } | |
a => { return a } | |
a => a |
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
() => { statements } | |
() => { return statement } | |
() => statement |
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
//Arrow Function | |
const double = number => 2 * number | |
//Función tradicional | |
function double(number) { | |
return 2 * number | |
} |
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 numberOfPowersCalc = (book, books) => { | |
for (let i = 0; i++; i <= books.length) | |
if (book === books[i]) | |
return i | |
} | |
let posts = parseInt((document.getElementsByClassName('row_data')[1].childNodes[0].data).replace('.', '')) | |
let characterSheet = document.querySelectorAll('#custom_fields_personaje ul li .row_data') |
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 path = require('path') | |
module.exports = { | |
mode: 'production', | |
entry: { | |
"home": path.resolve(__dirname, 'src/entries/home.js'), | |
}, | |
output: { | |
path: path.resolve(__dirname, "dist"), | |
filename: 'js/[name].js', |
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
Show hidden characters
{ | |
"presets": [ | |
["env"], | |
"react" | |
] | |
} |
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
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
const app = document.getElementById('app') | |
class Home extends Component { | |
render() { | |
return ( | |
<div> | |
<p>Hola Mundo desde Reactjs :D</p> |