role of parentheses in javascript
<p>I'd like to know the difference between the following and the role of the parentheses:</p>

<pre><code>foo.bar.replace(a,b)
</code></pre>

<p>and</p>

<pre><code>(foo.bar).replace(a,b)
</code></pre>

<p>do the parentheses require the contained expression to be evaluated first before moving on to the replace method? I have seen this in code I am maintaining and am curious as to why it would be neccessary? E.G.</p>

<pre><code>location.hash.replace(a,b)
</code></pre>

<p>and</p>

<pre><code>(location.hash).replace(a,b)
</code></pre>
