title: Why is an anonymous function on its own a syntax error in javascript?
body: <p>If I try to execute a script whose only source line is an object:</p>
  
  <pre><code>{prop:'value'}
  </code></pre>
  
  <p>it parses fine (in both V8 and UglifyJS). Similarly I can put a string or number on its own as source code and there is no syntax error reported.</p>
  
  <p>However, both V8 and UglifyJS complain about this on its own:</p>
  
  <pre><code>function(){}
  </code></pre>
  
  <p>I get <code>Uncaught SyntaxError: Unexpected token (</code>.</p>
  
  <p>Why does this break when the object in the first example is fine? Aren't functions just objects in javascript?</p>
  
  <p>I realise declaring an anonymous function without executing it won't do anything; that's not the question. I want to know why it causes a parse error.</p>