Create an array in javascript of custom objects
<p>Hi I need some help with javascript. </p>

<pre><code>function PricingData(id,method,freq,service,price) {
            this.ID=id;
            this.PaymentMethod_ID=method;
            this.PaymentFrequency_ID=freq;
            this.Service_ID=service;
            this.Price=price;
        }
</code></pre>

<p>I need to create an array in this way.</p>

<pre><code>var temp=new PricingData[]{new PricingData(1,2,3,4,5),new PricingData(1,2,3,4,5)};
</code></pre>

<p>but this doesn't work. I'm going to pass the data in through the server so I would prefer syntax similar to this</p>
