Skip to content

Commit 11686e6

Browse files
authored
ref #339
1 parent 7a30247 commit 11686e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/const.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,6 @@ foo.bar = 456; // Allowed!
6262
console.log(foo); // { bar: 456 }
6363
```
6464

65-
For this reason I recommend using `const` with primitives or immutable data structures.
65+
#### Prefer const
66+
67+
Always use `const`, unless you plan to either lazily initialization of a variable, or do a reassignment (use `let` for those cases).

0 commit comments

Comments
 (0)