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 fs = require("fs"); | |
//Funcion para eliminar acentos | |
function removeAccents(str) { | |
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); | |
} | |
function leerJSON() { | |
const data = fs.readFileSync(__dirname + "/characters.json", "utf-8"); | |
return JSON.parse(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
Filtrar una lista de peliculas segun parametros | |
node index.js --sort title | |
-Objetivo | |
Recibir argumentos por la terminal y mostrar el listado de peliculas en base a estos. | |
-Arquitectura | |
3 arhcivos escenciales: | |
. Index.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
///TESTFUNCTION.JS | |
// completar acá importando el módulo "datos" | |
// que tiene las funciones getAll y getOlderThan | |
const datos = require("./datos.js"); | |
// const datos = require("./datos"); | |
function testeaModuloDatos() { | |
const todos = datos.getAll(); |
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
//index. js | |
const obj = require('./introArray'); | |
const argumentos = process.argv.slice(2); | |
function main(){ | |
console.log(obj.pasarAObj(argumentos)); | |
} | |
main(); |
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
//questions.js | |
const questions = [ | |
{ | |
question: "¿Cuál es la capital de Francia?", | |
options: ["1. Berlín", "2. Madrid", "3. París", "4. Roma"], | |
answer: 3, | |
}, | |
{ | |
question: "¿Cuántos planetas hay en el sistema solar?", | |
options: ["1. 7", "2. 8", "3. 9", "4. 10"], |
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 propiedades = [ | |
{ | |
barrio: "Palermo", | |
tipoOperacion: "alquiler", | |
tipoPropiedad: "departamento", | |
ambientes: 2, | |
precio: 120000, | |
metrosCuadrados: 50, | |
}, | |
{ |
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 miPlayList = [ | |
{ | |
titulo:"Aprendé a codear un asistente AI ✨ completo", | |
url: "https://www.youtube.com/watch?v=eGDhXzIEoE0", | |
resumen:"El video se centra en darte una introduccion, dandote ideas claras y concretas para resolver problemas reales con una agente basado en modelo de lenguaje (LLM).", | |
tags: ["IA", "Programacion", "APX", "LLM", "Introduccion"], | |
visto: true, | |
dificultad: 3, | |
}, | |
{ |
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 yo = { | |
nombre: "Emanuel", | |
apellido: "Bustos", | |
edad: 19, | |
pais: "Argentina", | |
sabeManejar: false, | |
mascotas: [ | |
{ nombre: "Greta", especie: "perra" }, | |
{ nombre: "Bruna", especie: "perra" }, | |
], |