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

Skip to content

Commit e88e536

Browse files
Merge pull request ryanmcdermott#66 from darahak/master
Mention async functions as part of ES2017 instead of ES7 (ES2016)
2 parents 04c29e4 + 7599859 commit e88e536

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const yearMonthDay = moment().format('YYYY/MM/DD');
5353
```
5454
**[⬆ back to top](#table-of-contents)**
5555

56-
### Use ES6 constants when variable values do not change
56+
### Use ES2015/ES6 constants when variable values do not change
5757
In the bad example, the variable can be changed.
5858
When you declare a constant, the variable should stay
5959
the same throughout the program.
@@ -593,7 +593,7 @@ show the difference between two arrays? You could write your new function
593593
to the `Array.prototype`, but it could clash with another library that tried
594594
to do the same thing. What if that other library was just using `diff` to find
595595
the difference between the first and last elements of an array? This is why it
596-
would be much better to just use ES6 classes and simply extend the `Array` global.
596+
would be much better to just use ES2015/ES6 classes and simply extend the `Array` global.
597597
598598
**Bad:**
599599
```javascript
@@ -1416,7 +1416,7 @@ inventoryTracker.requestItems();
14161416
```
14171417
**[⬆ back to top](#table-of-contents)**
14181418
1419-
### Prefer ES6 classes over ES5 plain functions
1419+
### Prefer ES2015/ES6 classes over ES5 plain functions
14201420
It's very difficult to get readable class inheritance, construction, and method
14211421
definitions for classical ES5 classes. If you need inheritance (and be aware
14221422
that you might not), then prefer classes. However, prefer small functions over
@@ -1713,7 +1713,7 @@ describe('MakeMomentJSGreatAgain', function() {
17131713
17141714
## **Concurrency**
17151715
### Use Promises, not callbacks
1716-
Callbacks aren't clean, and they cause excessive amounts of nesting. With ES6,
1716+
Callbacks aren't clean, and they cause excessive amounts of nesting. With ES2015/ES6,
17171717
Promises are a built-in global type. Use them!
17181718
17191719
**Bad:**
@@ -1752,10 +1752,10 @@ require('request-promise').get('https://en.wikipedia.org/wiki/Robert_Cecil_Marti
17521752
**[⬆ back to top](#table-of-contents)**
17531753
17541754
### Async/Await are even cleaner than Promises
1755-
Promises are a very clean alternative to callbacks, but ES7 brings async and await
1755+
Promises are a very clean alternative to callbacks, but ES2017/ES8 brings async and await
17561756
which offer an even cleaner solution. All you need is a function that is prefixed
17571757
in an `async` keyword, and then you can write your logic imperatively without
1758-
a `then` chain of functions. Use this if you can take advantage of ES7 features
1758+
a `then` chain of functions. Use this if you can take advantage of ES2017/ES8 features
17591759
today!
17601760
17611761
**Bad:**

0 commit comments

Comments
 (0)