title: Javascript dynamically invoke object method from string
body: <p>Can I dynamically call an object method having the method name as a string? I would imagine it like this:</p>
  
  <pre><code>var FooClass = function() {
      this.smile = function() {};
  }
  
  var method = "smile";
  var foo = new FooClass();
  
  // I want to run smile on the foo instance.
  foo.{mysterious code}(); // being executed as foo.smile();
  </code></pre>