This file contains 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
codigo terminado con las especificaciones del uso de get,put,deletey el post | |
const express = require('express') | |
const app = express() | |
const port = 3000 | |
let bodyParser = require('body-parser'); | |
app.use(bodyParser.json()); | |
let products = []; |
This file contains 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 express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get('/', (req, res) => res.send('Hola Mundo saludos desde Ecuador')); | |
app.listen(port, () => console.log(`App de ejemplo escuchando en el puerto ${port}!`)); |
This file contains 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"); | |
async function findSalesFiles(folderName) { | |
// this array will hold sales files as they are found | |
let salesFiles = []; | |
async function findFiles(folderName) { | |
// read all the items in the current folder | |
const items = await fs.readdirSync(folderName, { withFileTypes: true }); |
This file contains 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
//codigo de bloqueo | |
var fs = require("fs"); | |
var data = fs.readFileSync('input.txt'); | |
console.log(data.toString()); | |
console.log("Program Ended"); |
This file contains 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 http = require("http"); | |
http.createServer(function (request, response) { | |
// Send the HTTP header | |
// HTTP Status: 200 : OK | |
// Content Type: text/plain | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
// Send the response body as "Hello World" | |
response.end('Hola sky Kuuz\n'); |
This file contains 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 multiplos | |
{ | |
constructor(primerNum,segundoNum,limite){ | |
this.primerNum=primerNum; | |
this.segundoNum=segundoNum; | |
this.limite = limite; | |
this.suma = 0 | |
} | |
sumar() |
This file contains 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
//compare-scopes-of-the-var-and-let-keywords. | |
function checkScope() { | |
'use strict'; | |
let i = 'function scope'; | |
if (true) { | |
let i = 'block scope'; | |
console.log('Block scope i is: ', i); | |
} | |
console.log('Function scope i is: ', i); |
This file contains 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
/*use-recursion-to-create-a-range-of-numbers*/ | |
function rangeOfNumbers(startNum, endNum) { | |
if (endNum - startNum === 0) { | |
return [startNum]; | |
} else { | |
var numbers = rangeOfNumbers(startNum, endNum - 1); | |
numbers.push(endNum); | |
return numbers; | |
} |
This file contains 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
body { | |
width: 100%; | |
margin-top: 50px; | |
margin-left: 135px; | |
} | |
#map {height: 98vh; width:100hw;} |