title: 'let' vs 'var' in javascript for loops, does it mean that all the for loops using the 'var i =0' should actually be 'let i =0' instead?
body: <p>Since according to <a href="https://stackoverflow.com/questions/762011/javascript-let-keyword-vs-var-keyword">What&#39;s the difference between using &quot;let&quot; and &quot;var&quot; to declare a variable?</a>, the let keyword has a smaller scope than var when used in a for loop. Does this mean that of all the places where 'for (var i=0...' the actual correct way should be to use let? I can't imagine a case where a developer who was using 'for (var i=0...' would want to have the var i still be visible outside the for loop, meaning that all 'for (var i=0...' are wrong and the correct way is 'for (let i=0...'? Just a yes or no question.</p>
  
  <pre><code>function allyIlliterate() {
      //tuce is *not* visible out here
  
      for( let tuce = 0; tuce &lt; 5; tuce++ ) {
          //tuce is only visible in here (and in the for() parentheses)
      };
  
      //tuce is *not* visible out here
  };
  
  function byE40() {
      //nish *is* visible out here
  
      for( var nish = 0; nish &lt; 5; nish++ ) {
          //nish is visible to the whole function
      };
  
      //nish *is* visible out here
  };
  </code></pre>