View scope.js
const a = 1; | |
const b = 2; | |
const c = 3; | |
(function firstFunction() { | |
const b = 5; | |
const c = 6; | |
(function secondFunction() { | |
const b = 8; | |
(function thirdFunction() { |
View async.js
const p = () => Promise.resolve(5); | |
const y = async () => { | |
const t = await p(); | |
console.log(t); | |
}; | |
y(); | |
console.log('hello'); |
View test.js
function foo() { | |
baz(); | |
} | |
function bar() { | |
baz(); | |
} | |
function baz() { | |
console.log(`baz() was called from: ${whereWasICalledFrom()}`); |
View index.js
const mongoose = require('mongoose'); | |
(async()=>{ | |
await mongoose.connect('mongodb://nodeco-test-user:nodecotest1234@ds163822.mlab.com:63822/nodeco-test-01-mayo', { | |
useNewUrlParser: true, | |
useUnifiedTopology: true | |
}); | |
})() |
View scope.js
/* for (var i = 1; i <= 5; i++) { | |
(function() { | |
setTimeout(function timer() { | |
console.log(i); | |
}, i * 1000); | |
})(); | |
} */ | |
/* for (var i = 1; i <= 5; i++) { | |
(function() { |
View daniel2.js
const getReview = async slug => { | |
try { | |
const userUid = await knex('user') | |
.where({ | |
company_name: slug | |
}) | |
.select('uid'); | |
const userReviews = await axios.get( | |
`${url}/quotes/v1/reviews/?user=${user_uid}`, |
View paso16.html
<html> | |
<body> | |
<div> | |
<div>PROP: <span>hola soy un texto estático</span></div> | |
<div>ESTADO: <span id="clicks">0</span></div> | |
<button id="boton">click acá</button> | |
</div> | |
<script type="text/javascript"> | |
const clicksElement = document.getElementById('clicks'); | |
const boton = document.getElementById('boton'); |
View paso15.html
<html> | |
<head> | |
<title>un título</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.letra-color-azul { | |
color: blue; | |
} | |
</style> | |
</head> |
View paso14.html
<html> | |
<head> | |
<title>un título</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.letra-color-azul { | |
color: blue; | |
} | |
</style> | |
</head> |
NewerOlder