4 ms·
Wait till you see ES7 async and await :-D http://imgur.com/HvQbw48 http://imgur.com/HvQbw48
by SimeVidas 12y ago
Wait till you see ES7 async and await :-D http://imgur.com/HvQbw48 http://imgur.com/HvQbw48
- kxo 12y agoWhich can be used today via 6to5!
- jordanlev 12y ago6to5 compiles ES7 too?
- Chris_Newton 12y agoSometimes, yes. :-) http://kangax.github.io/compat-table/es7/ http://kangax.github.io/compat-table/es7/
- eddyb 12y agoI had first seen async/await in traceur-compiler. I was using it with Node.js' fs module two years ago, I believe.
- Touche 12y agoHow do you return a result (this function isn't doing so)? I'm guessing getJSON could be returning a Promise but there must be a way to do the same in an async function. EDIT, here's the spec, looks like you can just return: https://github.com/lukehoban/ecmascript-asyncawait https://github.com/lukehoban/ecmascript-asyncawait