Skip to content

Commit ac47e82

Browse files
committed
Remove ES6 constants subsection
We need a better explanation for when to prefer `const` over var/let, as this has confused many readers.
1 parent d333e12 commit ac47e82

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

README.md

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

56-
### Use ES2015/ES6 constants when variable values do not change
57-
In the bad example, the variable can be changed.
58-
When you declare a constant, the variable should stay
59-
the same throughout the program.
60-
61-
62-
**Bad:**
63-
```javascript
64-
var FIRST_US_PRESIDENT = "George Washington";
65-
```
66-
67-
**Good**:
68-
```javascript
69-
const FIRST_US_PRESIDENT = "George Washington";
70-
```
71-
**[⬆ back to top](#table-of-contents)**
72-
73-
7456
### Use the same vocabulary for the same type of variable
7557

7658
**Bad:**

0 commit comments

Comments
 (0)