Last active
October 8, 2018 22:19
-
-
Save carlosvega20/1de5dffc2effe031bde2b0cf8f57d1c2 to your computer and use it in GitHub Desktop.
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 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