Skip to content

Commit 7599859

Browse files
committed
Mention async functions as part of ES2017 instead of ES7 (ES2016) + switch to "ES<year>/ES<edition>" when mentioning ECMAScript versions.
1 parent ddd0181 commit 7599859

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var 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.
@@ -598,7 +598,7 @@ show the difference between two arrays? You could write your new function
598598
to the `Array.prototype`, but it could clash with another library that tried
599599
to do the same thing. What if that other library was just using `diff` to find
600600
the difference between the first and last elements of an array? This is why it
601-
would be much better to just use ES6 classes and simply extend the `Array` global.
601+
would be much better to just use ES2015/ES6 classes and simply extend the `Array` global.
602602

603603
**Bad:**
604604
```javascript
@@ -1421,7 +1421,7 @@ inventoryTracker.requestItems();
14211421
```
14221422
**[⬆ back to top](#table-of-contents)**
14231423

1424-
### Prefer ES6 classes over ES5 plain functions
1424+
### Prefer ES2015/ES6 classes over ES5 plain functions
14251425
It's very difficult to get readable class inheritance, construction, and method
14261426
definitions for classical ES5 classes. If you need inheritance (and be aware
14271427
that you might not), then prefer classes. However, prefer small functions over
@@ -1716,7 +1716,7 @@ describe('MakeMomentJSGreatAgain', function() {
17161716

17171717
## **Concurrency**
17181718
### Use Promises, not callbacks
1719-
Callbacks aren't clean, and they cause excessive amounts of nesting. With ES6,
1719+
Callbacks aren't clean, and they cause excessive amounts of nesting. With ES2015/ES6,
17201720
Promises are a built-in global type. Use them!
17211721

17221722
**Bad:**
@@ -1755,10 +1755,10 @@ require('request-promise').get('https://en.wikipedia.org/wiki/Robert_Cecil_Marti
17551755
**[⬆ back to top](#table-of-contents)**
17561756

17571757
### Async/Await are even cleaner than Promises
1758-
Promises are a very clean alternative to callbacks, but ES7 brings async and await
1758+
Promises are a very clean alternative to callbacks, but ES2017/ES8 brings async and await
17591759
which offer an even cleaner solution. All you need is a function that is prefixed
17601760
in an `async` keyword, and then you can write your logic imperatively without
1761-
a `then` chain of functions. Use this if you can take advantage of ES7 features
1761+
a `then` chain of functions. Use this if you can take advantage of ES2017/ES8 features
17621762
today!
17631763

17641764
**Bad:**

0 commit comments

Comments
 (0)