title: Why can't I directly assign document.getElementById to a different function?
body: <p>So I'm trying to define a function g() that is like document.getElementById. The following works just fine:</p>
  
  <pre><code>var g = function(id){return document.getElementById(id)};
  </code></pre>
  
  <p>But why doesn't this more direct code work?</p>
  
  <pre><code>var g = document.getElementById;
  </code></pre>