title: Why does calling a function in the Node.js REPL with )( work?
body: <p>Why is it possible to call function in JavaScript like this, tested with node.js:</p>
  
  <pre><code>~$ node
  &gt; function hi() { console.log("Hello, World!"); };
  undefined
  &gt; hi
  [Function: hi]
  &gt; hi()
  Hello, World!
  undefined
  &gt; hi)( // WTF?
  Hello, World!
  undefined
  &gt;
  </code></pre>
  
  <p>Why does the last call, <code>hi)(</code>, work? Is it bug in node.js, bug in V8 engine, officially undefined behaviour, or actually valid JavaScript for all interpreters?</p>