title: How to invoke a method received as parameter inside an object literal
body: <p>I run this code without any errors:  </p>
  
  <pre><code>(function(a, b){
  return a.foo = {
      call: function(name, args) {
          this.myFunction.call(null, args)
      },
      myFunction: function(args) {
          console.log("myFunction has been called!");
          console.log(args);
      }
  }
  
  })(window, document);
  
  foo.call('myFunction', ['arg1', 'arg2']);  
  </code></pre>
  
  <p>However, if I use <code>this.name.call(null, args)</code> instead of <code>this.myFunction.call(null, args)</code> like this:</p>
  
  <pre><code>(function(a, b){
  return a.foo = {
      call: function(name, args) {
          this.name.call(null, args)
      },
      myFunction: function(args) {
          console.log("myFunction has been called!");
          console.log(args);
      }
  }
  
  })(window, document);
  
  foo.call('myFunction', ['arg1', 'arg2']);
  </code></pre>
  
  <p>I get the <code>Uncaught TypeError: Cannot read property 'call' of undefined</code> error.</p>
  
  <p>How can I invoke a function from a string parameter?</p>
  
  <p>Thanks in advance.</p>