In this article, I want to discuss why I prefer const over let when declaring variables in JavaScript. Truth about const Variables declared with const often come across as being immutable. Now, if you have written JavaScript for a while, you know tha...

Markdown supported · ⌘↵ to post
Reassignments are wrong, they are a code smell, and they aren't good to write, avoid them whenever you can.
Exactly!
Ákos Kőműves
Full-Stack Developer and Writer
This topic is strange to me, probably because, by default, I write const. I don't know why. 😄
There's also a linter rule that fixes all your unnecessary let usages eslint.org/docs/latest/rules/prefer-const.