Skip to content

Instantly share code, notes, and snippets.

@lcs-felix
Created February 26, 2021 00:22
Show Gist options
  • Save lcs-felix/0dcc765bd1475a5a2f3cb67cb63a03cd to your computer and use it in GitHub Desktop.
Save lcs-felix/0dcc765bd1475a5a2f3cb67cb63a03cd to your computer and use it in GitHub Desktop.
function yahooJapan() {
for(let i = 0; i < 3; i++) {
console.log('request')
const request = require('sync-request');
request('GET', 'https://www.yahoo.co.jp/', {
headers: {
'user-agent': 'example-user-agent',
},
});
}
}
function promessa() {
return Promise.resolve()
}
function blah() {
console.log('inicio blah')
promessa().then(() => yahooJapan())
console.log('final blah')
}
blah()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment