title: Can a javascript anonymous function return itself?
body: <p>When binding event handlers, I've found the need to create a function, since it would need to be referenced twice; once initially, and once to the event binding:</p>
  
  <pre><code>// Define function
  function doSomething(){...}
  
  // Call function initially
  doSomething();
  
  // Pass function as the event handler
  $("#theElement").on("click", doSomething);
  </code></pre>
  
  <p>But then I realized I could start doing this by passing a self-invoking anonymous function as the event handler and returning <code>arguments.callee</code>:</p>
  
  <pre><code>// Much cleaner!
  $("#theElement").on("click", (function(){
      ...
      return arguments.callee;
  })());
  </code></pre>
  
  <p>Assuming that I do not ever use this function outside of these two instances, is it an okay practice to do so?</p>