Created
October 12, 2015 09:49
-
-
Save matthiasg/b793670953c740e28a4c to your computer and use it in GitHub Desktop.
ES7 Async test for sourcemaps
This file contains hidden or 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
asyncTest().then(()=>console.log('done')); | |
async function asyncTest(){ | |
let asyncTest = await test(); | |
} | |
async function test(){ | |
var t = new Array(10); | |
for (var i = 0; i < t.length; i++) { | |
test2(); | |
} | |
return await wait(1000); | |
} | |
function wait(time){ | |
return new Promise((resolve,reject)=>{ | |
setTimeout(resolve,time); | |
}); | |
} | |
function test2(){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment