Where does this common pattern fail in real code?

I want a practical take on this Stack Overflow classic:

What would your team standard be for this issue and why?

MechaPrime

Team standard should be const by default and let only when reassignment is intentional, because var mostly fails in real code when function scope leaks state across loops or conditionals and the bug shows up far from where it started.

Ellen