title: Why should I use let instead of const inside functions?
body: <p>I add linters for js (es6) in my project, and for new configurations I found that they prevent using <code>const</code> inside functions - only for module-level constants. And inside functions I should use <code>let</code>. But I can't find any ground for such rule. Why?</p>
  <p>For jscs it's for example</p>
  <blockquote>
  <p>disallowConstOutsideModuleScope: <code>const</code> should only be used in module scope (not inside functions/blocks)</p>
  </blockquote>
  <p>I understand that I can configure and switch off that rule, I just wonder what for it was enabled ? What is the motivation for such checking?</p>
  <p>P.S. I have link <a href="https://madhatted.com/2016/1/25/let-it-be" rel="noreferrer">https://madhatted.com/2016/1/25/let-it-be</a> with block &quot;Constantly const&quot;</p>
  <blockquote>
  <p>There is another school of thought on when to use let and const I’ll need to address. This strategy suggests developers use const as much as possible. Any variable that is not re-assigned should be declared with const.</p>
  <p>I think this usage is poor practice. It adds an extra distraction to the process of programming, and results in code difficult to understand and change.</p>
  </blockquote>
  <p>But I can't find that arguments valuable</p>