title: printing localVariable keeps giving error
body: <p>console.log(localVariable keeps giving a reference error</p>
  <pre><code>var globalVariable = &quot;A&quot;; // a global variable
          function testScope1() {
          var localVariable = &quot;B&quot;; // a local variable
          
          
          }
  
          console.log(globalVariable); // A
          console.log(localVariable); // ReferenceError
  </code></pre>