title: How to pass argument to javascript anonymous function
body: <p>Can someone explain to me why x is undefined? Shouldn't be 123?</p>
  
  <pre><code>doSomething = (function(x) {
     alert(x)
  })();
  
  doSomething(123);
  </code></pre>