title: what does bind(this) means?
body: <p>I already know that what bind do, it bound your given object or function to the function you want, but <code>bind(this)</code> is really confusing me.What does <code>this</code> in <code>bind</code> really means.</p>
  
  <p>Below is the code from my react app with firebase Database.</p>
  
  <pre><code>componentWillMount: function() {
      this.firebaseRef = firebase.database().ref('todos');
      this.firebaseRef.limitToLast(25).on('value', function(dataSnapshot) {
        var items = [];
        dataSnapshot.forEach(function(childSnapshot) {
          var item = childSnapshot.val();
          item['key'] = childSnapshot.key;
          items.push(item);
        }.bind(this));
  
        this.setState({
          todos: items
        });
      }.bind(this));
  
    },
  </code></pre>