title: Is there any reason to keep using var?
body: <p>WHY NOT TO BAN 'VAR'?
  My question is not about the difference between 'var' and 'let'. All such answers are advocating the advantages of using 'let'.
  My question is: why not to tell frankly "do not use 'var' anymore"?
  Is there a reason for not being so direct?</p>
  
  <p>'var' is still in use on many serious tutorial sites: Mozilla MDN, w3schools ... 
   I am wondering if there is an hidden reason that I am missing.</p>
  
  <p>There is one answer below: legacy (old browsers not supporting ES6)
  Is that the only reason?
  Any performance reason?
  Or some fancy use of hoisting?</p>
  
  <p>[ Here was the rest of my original post... </p>
  
  <pre><code>var arr = [];    // -&gt; const arr = [];
  var obj = {};    // -&gt; const obj = {};
  var temp;        // -&gt; let temp;
  var f = function(){};    // -&gt; const f = function(){};
  </code></pre>
  
  <p>Doing so, I think that the only way a variable may behave like a <code>var</code> variable (hoisting etc.), is an -unfortunately- undeclared variable: <code>x = sthg;</code> in some function (becoming: <code>var x = sthg;</code> at global scope).
  If I missed something, it would highly help me. ]</p>