Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ES version for async functions #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
darahak opened this issue Jan 6, 2017 · 3 comments
Closed

ES version for async functions #52

darahak opened this issue Jan 6, 2017 · 3 comments

Comments

@darahak
Copy link
Contributor

darahak commented Jan 6, 2017

First, thanks a lot for this guide. Love it!
I just wanted to point out one little mistake.

Promises are a very clean alternative to callbacks, but ES7 brings async and await which offer an even cleaner solution. All you need is a function that is prefixed in an async keyword, and then you can write your logic imperatively without a then chain of functions. Use this if you can take advantage of ES7 features today!

Actually ES2016 (or ES7) only added two features: Array.prototype.includes and the exponentiation operator.

Async/Await is featured in ES2017 (or ES8).

@ryanmcdermott
Copy link
Owner

I'm really glad this has been helpful!

Interesting, I didn't realize the standards committee hadn't approved that. Can you send a PR for that? If not, no worries!

For everyone's reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_Next_support_in_Mozilla

@darahak
Copy link
Contributor Author

darahak commented Jan 7, 2017

Sure, I'll make a PR πŸ‘ (but I'm going to sleep now, it's 3 AM here πŸ˜„ )
Do you want to keep the ES5/6/7/... form or switch to the new one with the yearly releases?
Maybe both for the people who might not be aware of the correlation?

@ryanmcdermott
Copy link
Owner

Haha good! Get rest, code ends up cleaner that way :)

So how about we just do a simple change with the wording and say it would be an ES2017/ES8 feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants