Use “let” by default, not “const”
Paul Sweeney
132

The way I write code 90% of my variables do not, and won’t ever be re-assigned. Simply put I treat variables as mental signposts, and most of the time they serve no other purpose. As of recently I’ve been declaring them as const, which reads at least as well if not better then when everything was declared as let …. but if there is a true benefit its not a significant one. As you touched upon a well written function (hopefully performing only one thing) should be small enough to be readable.

Either way I would never block a review if one or another approach or inconsistent mix of the two was used.

I would say write as you wish, read as you should :)

Side note: large number of re-assigned variables may signal bad habits, lending itself to unforeseen side effects (some algorithmic in place wonders aside).

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.