In Javascript, why write "var QueryStringToHash = function QueryStringToHash (query) { ... }"?
<p>In Javascript, I have seen</p>

<pre><code>var QueryStringToHash = function QueryStringToHash  (query) {
    ...
}
</code></pre>

<p>What is the reason of writing that instead of just</p>

<pre><code>function QueryStringToHash(query) {
    ...
}
</code></pre>

<p>?</p>

<p>This comes from the answer in <a href="http://stackoverflow.com/questions/1131630/javascript-jquery-param-inverse-function">http://stackoverflow.com/questions/1131630/javascript-jquery-param-inverse-function</a></p>
