title: JavaScript: invoke function or call a property via reflection
body: <p>Is there a way to call a function (or a property) on an object via reflection, in JavaScript?</p>
  
  <p>Lets say that during run-time, my code has already determined that objectFoo indeed has a property called 'bar'.   Now that my code knows that, the next thing I want to do is invoke that.   Normally i would do this:  var x = objectFoo.bar.    But 'bar' was determined at run time, so I need to invoke it using reflection.</p>