How do JavaScript members/properties work?
<p>What is the difference between an object create with this syntax: <code>{ prop1: val1, prop2: val2 }</code>, and an object created with this syntax: <code>{ 'prop1': val1, 'prop2': val2 }</code>?</p>

<p>And also, does the following code work?</p>

<pre><code>var val1 = 10, val2 = 15;
var tmp1 = { prop1: val1 };
var tmp2 = { 'prop2': val2 };
alert(tmp1['prop1']); // I expect 10
alert(tmp2['prop2']); // I expect 15
</code></pre>

<hr>

<p>P.S.: Sorry, I couldn't come up with a better title for my question. That reflects my lack of knowledge of JavaScript.</p>
