title: Declaring const in a function do not throw error?
body: <p>Why can we declare a const in a function and call the function multiple times <strong>without getting an error</strong></p>
  <blockquote>
  <p>Uncaught SyntaxError: Identifier 'newTab' has already been declared</p>
  </blockquote>
  <p>It is creating a new const every time we call the function?</p>
  <p>Code to illustrate :</p>
  <pre class="lang-js prettyprint-override"><code>function foo() {
    const newTab = [123]
    console.log(newTab);
  }
  </code></pre>
  <p>Thanks if someone can enlighten me :)</p>