title: JSON call inside object failing. Uncaught Reference: data is not defined
body: <p>When I instantiate an object, it should fetch data using jQuery's getJSON method and fill the object's properties from that data. Instead, I get <code>Uncaught Reference: data is not defined</code> on the AJAX call. <code>data</code>, in this case, is the name of the JSON data object argument I'm passing to my callback function.</p>
  
  <p>My constructor:</p>
  
  <pre><code>function HeadlineList(url) {
      this.url = url;
  
      this.checkEmpty = function() {
          if (this.headlines === 0) {
              this.refreshContent();
          }
      };
  
      this.getRandom = function(remove) {
          var headlineNumber = Math.floor(Math.random()*this.quantity);
          var headline = this.headlines[headlineNumber];
          if (remove) {
              this.deleteHeadline(headlineNumber);
          }
          return headline;
      };
  
      this.getHeadline = function(number, remove) {
          var headline = this.headlines[number]
          if (remove) {
              this.deleteHeadline(number);
          }
          return headline;
      };
  
      this.deleteHeadline = function(number) {
          this.headlines.splice(number, 1);
          this. quantity -= 1;
      };
  
      this.fillFromJSON = function(data) {
        this.headlines = data.headlines;
        this.quantity = this.list.length;
      };
  
      this.refreshContent = function() {
          $.getJSON(this.url, this.fillFromJSON(data));
      };
  
      this.refreshContent();
  }
  </code></pre>
  
  <p>I'm instantiating an object like so:</p>
  
  <pre><code>headlines = new HeadlineList('js/headlines.json');
  </code></pre>
  
  <p>Can anyone help me figure out why this doesn't work?</p>