title: Passing scope to forEach
body: <p>I'm trying to use a callback method <code>addToCount</code> instead of anonymous function in <code>forEach</code>. But I can't access <code>this.count</code> in it (returns <code>undefined</code>).</p>
  
  <pre><code>function Words(sentence) {
    this.sentence = sentence;
    this.count = {};
    this.countWords();
  }
  
  Words.prototype = {
    countWords: function() {
      var words = this.sentence.split(/\W+/);
      words.forEach(this.addToCount);
    },
    addToCount: function(word) {
      word = word.toLowerCase();
      if (word == '') return;
      if (word in this.count)
        this.count[word] += 1;
      else
        this.count[word] = 1;
    }
  }
  </code></pre>
  
  <p>I think the problem is the scope. How can I pass <code>this</code> to <code>addToCount</code> or is there any other way to make it work?</p>