In JS, how can I use a string to define a JS object parameter?
<p>I have a function defined that way:</p>

<pre><code>var myObject = new Object();

    function myFunction(someString){

         myObject.someString= 0;

    }
</code></pre>

<p>The problem is <code>someString</code> is taken as the string <code>someString</code> instead of the value of that variable.</p>

<p>So, after I use that function several times over with different <code>someString</code>'s, I would like to get an object with all the values for each someString.</p>

<p>But when I loop through that object
The only result I get is <code>someString : 0</code></p>

<p>I want to get:</p>

<pre><code>John : 0
James : 0
Alex : 0 etc....
</code></pre>

<p>How do I do that? Thanks a lot in advance</p>
