3 ms·
It's hard to believe this is javascript. I write that with a lot of love. These are some of my favorite language features but It's going to take some adjustment
by reconbot 12y ago
It's hard to believe this is javascript. I write that with a lot of love. These are some of my favorite language features but It's going to take some adjustment to be comfortable using and reading them in JS.
- netcraft 12y agoThe more I see and learn about ES6 the more I think JS code is going to look completely different in a couple years than it looks today - and in a good way.
- SimeVidas 12y agoWait 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
- hcarvalhoalves 12y agoES6 makes a lemonade out of a pineapple.