Debes crear el listener que hace falta, para el evento "keypress", que es el encargado de observar cuando el usuario presiona una tecla. Este evento entrega un atributo llamado keyCode el cual contiene el n煤mero de la tecla presionada. Para completar el ejercicio debes leer el c贸digo que ya existe. CodePen
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 functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
const spawn = require("child-process-promise").spawn | |
const path = require('path'); | |
const os = require('os'); | |
const fs = require('fs'); | |
admin.initializeApp() | |
exports.generateThumbnail = functions.storage.object().onFinalize(async (object) => { |
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
// constantes | |
const URL = "https://rickandmortyapi.com/api/character/" | |
let height = 0 | |
// selectores | |
let ignition = document.querySelector('#ignition') | |
let container = document.querySelector('.container') | |
// grupo de characteres [SOLUCI脫N]>>>>>>>>>>>>>>>>>> | |
let chars = [] | |
// grupo de characteres [SOLUCI脫N]>>>>>>>>>>>>>>>>>> |
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
div.addEventListener('click', e => { | |
height += 460 | |
if (height > 9000) height = 0 | |
container.style.transition = "all 1s cubic-bezier(.27,-0.5,1,-0.47)" | |
container.style.transform = `translateY(-${height}px)` | |
}) |
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 from 'react' | |
import { Card, Avatar, Button, Tooltip, Icon } from 'antd' | |
import { Link } from 'react-router-dom' | |
import * as jsPDF from 'jspdf' | |
import bliss from '../../assets/blissiimg.gif' | |
import cob from '../../assets/cob.png' | |
// const vid = "https://firebasestorage.googleapis.com/v0/b/cursosonline-4b11c.appspot.com/o/courses%2Fanimations-css%2Fmodule1%2FAnimaciones3.1.mp4?alt=media&token=2ef60c65-f2c3-4d6d-ab88-5e769c5ababb" |
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
let users = [ | |
{ | |
name: "BlisS", | |
age: 30, | |
active: true, | |
payments: [10, 300, [30, 40], [1]] | |
}, | |
{ | |
name: "Aria", | |
age: 30, |
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
// Initialize Firebase | |
var config = { | |
apiKey: "AIzaSyCGN8a9Ya3GL1Bj1YmPrHTrsRJMRBmIXs", | |
authDomain: "fir-hub-3a019.firebaseapp.com", | |
databaseURL: "https://fir-hub-3a09.firebaseio.com", | |
projectId: "fir-hub-3a09", | |
storageBucket: "fir-hub-3a09.appspot.com", | |
messagingSenderId: "7651514496477" | |
}; | |
firebase.initializeApp(config); |
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 firebase from 'firebase/app' | |
import 'firebase/firestore' | |
// Initialize Firebase | |
const config = { | |
apiKey: "AIzaSyCGN8a9Yaw3GL1Bj1YmPrHTrsRJMRBmIXs", | |
authDomain: "fir-hub-3a019.firebaseapp.com", | |
databaseURL: "https://fir-hub-3a019.firebaseio.com", | |
projectId: "fir-hub-3a019", | |
storageBucket: "fir-hub-3a019.appspot.com", |
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, { useEffect, useReducer, useState } from 'react'; | |
import { getRestaurants, getUsers, saveDish, saveRestaurant } from './services/firebase' | |
import './App.css'; | |
export default function () { | |
let [rests, setRests] = useState([]) | |
let [users, setUsers] = useState([]) | |
useEffect(() => { |
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
//https://repl.it/@HectorBlisS2/TomatoSupportiveArrays | |
for(key in objeto){ | |
console.log( key + " : " + objeto[key] ) | |
} |