title: Call a Javascript function stored in an object property
body: <p>How come the code below doesn't work?</p>
  
  <pre class="lang-js prettyprint-override"><code>var x = {};
  x.a = alert;
  x.a('asdf'); // TypeError: Illegal invocation
  </code></pre>