cliff-effects icon indicating copy to clipboard operation
cliff-effects copied to clipboard

Prefer `const` over `let`

Open turnerhayes opened this issue 7 years ago • 1 comments

Use const by default.

This is still up for discussion; opening this issue so that it doesn't get lost.

#899 talked about converting var to let; this task will change some lets to const (if they are never reassigned).

turnerhayes avatar Oct 31 '18 00:10 turnerhayes

If we're using const to communicate, a couple other possible perspectives:

  1. const should be used anywhere you'd use ALL_CAPS.
  2. const should be used where you specifically don't want to change something, not just where some variable has not yet been changed.

knod avatar Oct 31 '18 00:10 knod