title: javascript function what is scope and why using $
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/205853/why-would-a-javascript-variable-start-with-a-dollar-sign">Why would a JavaScript variable start with a dollar sign?</a>  </p>
  </blockquote>
  
  
  
  <p>I am not sure what $scope and $defer are but they just seem to work.  </p>
  
  <pre><code>function xyz($scope, $defer) {
      xyz = this;
      this.defer = $defer;
      this.scope = $scope;
      this.scope.test = function(re) {
          console.log(this,arguments);
      }
  }
  </code></pre>