Replace var with let or const as appropriate.
See original GitHub issueI’m curious, what the stance is in terms of adopting let
and const
in this repo?
Possible approaches:
- Consistently ES5 (
var
only) - Consistently ES6 (e.g. would a PR be welcome that converts all
var
tolet
&const
?) - Allow internal inconsistency (mixed
var
,let
,const
within & between files)
This relates to how PRs should be reviewed with respect to usage of these keywords. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:20 (11 by maintainers)
Top Results From Across the Web
Replacing let with const - Charles Stover - Medium
In JavaScript, const affords a few benefits: It lets the team reviewing your code that the value is not going to change, improving...
Read more >Var, Let, and Const – What's the Difference? - freeCodeCamp
var declarations are globally scoped or function scoped while let and const are block scoped. var variables can be updated and re-declared ...
Read more >Five things to know about var, let, and const in JavaScript
As a rule of thumb, always use const to declare your variables unless they are likely to change in the runtime of your...
Read more >JavaScript: Var, Let, or Const? Which One Should you Use?
As a general rule, you should always declare variables with const, if you realize that the value of the variable needs to change,...
Read more >Code Inspection: 'var' is used instead of 'let' or 'const' - JetBrains
Reports a var declaration that is used instead of let or const . Both let and const are block-scoped and behave more strictly....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
please rewrite d3 in es2015+ syntax
It’s not a goal at this time to rewrite everything. We’re focused on getting 6.0 released.