@@ -53,7 +53,7 @@ var yearMonthDay = moment().format('YYYY/MM/DD');
53
53
```
54
54
** [ ⬆ back to top] ( #table-of-contents ) **
55
55
56
- ### Use ES6 constants when variable values do not change
56
+ ### Use ES2015/ ES6 constants when variable values do not change
57
57
In the bad example, the variable can be changed.
58
58
When you declare a constant, the variable should stay
59
59
the same throughout the program.
@@ -598,7 +598,7 @@ show the difference between two arrays? You could write your new function
598
598
to the ` Array.prototype ` , but it could clash with another library that tried
599
599
to do the same thing. What if that other library was just using ` diff ` to find
600
600
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.
602
602
603
603
** Bad:**
604
604
``` javascript
@@ -1421,7 +1421,7 @@ inventoryTracker.requestItems();
1421
1421
```
1422
1422
** [ ⬆ back to top] ( #table-of-contents ) **
1423
1423
1424
- ### Prefer ES6 classes over ES5 plain functions
1424
+ ### Prefer ES2015/ ES6 classes over ES5 plain functions
1425
1425
It's very difficult to get readable class inheritance, construction, and method
1426
1426
definitions for classical ES5 classes. If you need inheritance (and be aware
1427
1427
that you might not), then prefer classes. However, prefer small functions over
@@ -1716,7 +1716,7 @@ describe('MakeMomentJSGreatAgain', function() {
1716
1716
1717
1717
## ** Concurrency**
1718
1718
### 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,
1720
1720
Promises are a built-in global type. Use them!
1721
1721
1722
1722
** Bad:**
@@ -1755,10 +1755,10 @@ require('request-promise').get('https://en.wikipedia.org/wiki/Robert_Cecil_Marti
1755
1755
** [ ⬆ back to top] ( #table-of-contents ) **
1756
1756
1757
1757
### 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
1759
1759
which offer an even cleaner solution. All you need is a function that is prefixed
1760
1760
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
1762
1762
today!
1763
1763
1764
1764
** Bad:**
0 commit comments