[guide] Use const when not reassigning reference

This commit is contained in:
Robin Pokorný
2017-02-02 13:31:10 +01:00
committed by Jordan Harband
parent e22f02cda3
commit 9375fb59b3

View File

@@ -1588,7 +1588,7 @@ Other Style Guides
```javascript
// bad
let array = [1, 2, 3];
const array = [1, 2, 3];
let num = 1;
num++;
--num;
@@ -1605,7 +1605,7 @@ Other Style Guides
// good
let array = [1, 2, 3];
const array = [1, 2, 3];
let num = 1;
num += 1;
num -= 1;