title: Javascript - Precedence in hoisting
body: <p>In hoisting, do variables take precedence over function definition or the other way round? Please see the code below:</p>
  
  <pre><code>function a()
  {
      var x = 10;
  
      function x() {
          return 20;
      }
  
      return x;
  }
  </code></pre>