title: Calling Internal Functions Inside Object
body: <p>Hopefully, this is a simple answer.  I am trying to call a method from inside my object, however, the console is throwing an error that the function is not a function.</p>
  
  <pre><code>function tabs(el, data){
      this.el = el;
  
      this.addTab = function(data){
          console.log("addTab", this.el, data);
      };
  
      data.forEach(function(data){
          this.addTab(data);
      });
  }
  </code></pre>
  
  <p>I am calling my object initially like so:</p>
  
  <pre><code>var t = new tabs("tabs", []);
  </code></pre>
  
  <p>My error is that addTab is not a function.</p>