Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer const over let #933

Open
turnerhayes opened this issue Oct 31, 2018 · 1 comment
Open

Prefer const over let #933

turnerhayes opened this issue Oct 31, 2018 · 1 comment

Comments

@turnerhayes
Copy link
Collaborator

turnerhayes commented Oct 31, 2018

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).

@knod
Copy link
Collaborator

knod commented Oct 31, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants