Re:JavaScript variables: var and let and const
by mgraczyk on Friday March 06, 2020 @02:50PM
(#22506653)
I think one important point that Dan and others miss is that `const` enforces a single-assignment style of variable naming that many find preferable. It makes it easier to read and forces people to provide more thoughtful names for their variables. I'm not saying that this behavior is enough to justify using `const` everywhere, but it should be weighed in any judgement about style.
[ Parent
| on HN ]
There are no comments on this comment yet.