title: "When we pass an anonymous function somewhere, the value of "this" is lost". What does this mean?
body: <p>I'm following a tutorial on Javascript and ES6 and in the example below I get an error: </p>
  
  <blockquote>
    <p>"TypeError: Cannot read property 'teamName' of undefined."</p>
  </blockquote>
  
  <p>The tutor explains it as: "Whenever we pass an anonymous function somewhere in our code base, the value of <code>this</code> inside of that function is lost!" What does he mean by that? Shouldn't <code>this</code> hold the object making the call and wouldn't that mean <code>team.teamName</code> which would return <code>Avengers</code> here? I'm confused.
  Also, how is the issue fixed when we use <code>.bind(this)</code>?</p>
  
  <pre><code>const team = {
   members: ['Tony', 'Peter'],
   teamName: 'Avengers',
   teamSummary: function() {
      return this.members.map(function(member) {
  
      return `${member} is a member of ${this.teamName}`;
  
    });
  
   }
  
  };
  
  team.teamSummary();
  </code></pre>