Skip to content

Instantly share code, notes, and snippets.

@carlosvega20
Last active October 8, 2018 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosvega20/1de5dffc2effe031bde2b0cf8f57d1c2 to your computer and use it in GitHub Desktop.
Save carlosvega20/1de5dffc2effe031bde2b0cf8f57d1c2 to your computer and use it in GitHub Desktop.
const npm = async moduleName => {
console.log('Fetching ' + moduleName + '... just one second');
let res = await fetch('https://cdn.jsdelivr.net/npm/' + moduleName + '@latest');
let bd = await res.text();
console.log(bd);
};
// npm('lodash');
const myfn = async () => 1;
// myfn().then(alert);
const myfn2 = async () => {
var myPromise = new Promise((succ, fai) => {setInterval(()=> succ(2222),100)})
console.log(await myPromise)
};
// myfn2();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment