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
//Recibibr argumentos de la terminal y delegar | |
//const { error } = require("console"); | |
const peli = require("./pelis"); | |
function main() {} | |
//traer la funcion de pelis segun lo que se coloque en la terminal, debe haber una funcion de interaccion. Averiguar | |
// como parsear un dato de la terminal | |
const flag = process.argv[2].toLowerCase(); | |
switch (flag) { | |
case "tag": | |
peli.tag(buscar("tag")); |
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
function playTrivia() { | |
if (index < questions.length) { | |
const q = questions[index]; | |
console.log(`\nPregunta ${index + 1}: ${q.question}`); | |
q.options.forEach((option) => console.log(option)); | |
rl.question("Tu respuesta (ingresa el número): ", (respuesta) => { | |
if (parseInt(respuesta) === q.answer) { | |
console.log("\x1b[32m¡Correcto!\x1b[0m"); | |
score++; |
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 Myplaylist = [ | |
{ | |
titulo: "Asi funciona el codigo", | |
url:"https://www.youtube.com/watch?v=hqJQKCT2tD0", | |
resumen:" En este video se hace una introduccion al codigo, entendiendo como funciona.", | |
tags:["Codigo","programación"], | |
visto: true, | |
dificultad: 2 | |
}, | |
{ |
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 Mensaje = "Hola Mundo¡ Este es mi primer gist"; | |
console.log (Mensaje); |