title: Difference between accessing variable inside a function by passing as argument and global variable?
body: <p>What is the difference of accessing variables inside the function by as argument and without argument?</p>
  
  <pre><code>var a = 1;
  var b = 2;
  
  function x() {
      var c = a + b;
      console.log(c)
  }
  
  function y(a, b) {
      var c = a + b;
      console.log(c)
  }
  </code></pre>