Literals and Objects - When to use what?
<p>I wonder when to use literals and when to use objects to create data type values.</p>

<p>Eg.</p>

<p>When do I use these:</p>

<pre><code>/regexp/
"string"
</code></pre>

<p>and when these:</p>

<pre><code>new RegExp("regexp")
new String("string")
</code></pre>

<p>Will these give me the same methods and properties?</p>
