Creating array of objects dynamically based on length
<p>I have the length of my previous object and i need to create a new array of objects based on the length with new key's.</p>

<pre><code>Length = 3;

var newArray = [];
for(var i =0; i &lt;3; i++){
    var Object = {};
    Object['newKey'] = 1;
    newArray.push(Object);
}
</code></pre>

<p>This would eventually create newArray of Objects whose length is 3 containing something like this.. <code>newArray[0],[1],[2]</code>. </p>

<p>Am i doing this correctly, please do suggest me if anything wrong or a better way to do this.</p>
