title: How do I get the right "this" in an Array.map?
body: <p>I assume there is some application of <code>call</code> or <code>apply</code> here but I'm not sure how to implement it.</p>
  
  <p><a href="http://codepen.io/anon/pen/oXmmzo" rel="noreferrer">http://codepen.io/anon/pen/oXmmzo</a></p>
  
  <pre><code>a = {
    foo: 'bar',
    things: [1, 2, 3],
    showFooForEach: function() {
      this.things.map(function(thing) {
        console.log(this.foo, thing);
      });
    }
  }
  
  a.showFooForEach();
  </code></pre>
  
  <p>Say I want to <code>map</code> an array, but in the function, I need access to the <code>this</code> to which <code>foo</code> belongs. The <code>function</code> of <code>map</code> creates a new <code>this</code> context, so I obviously need to coerse that context back in somehow,  but how do I do that while still having access to <code>thing</code>?</p>