Convert let to const

Replace let declarations that have no re-assignment with const declarations.

Refactoring (Convert)
ES2015
P42 for VS Code
P42 for GitHub
Convert let to const

Why is this refactoring helpful?

The const keyword prevents re-assigning the value of the variable. It makes it easier to reason about the code since re-assignment does not need to be considered.

Related Code Actions

Learn More

Available In