How to declare an custom object's instance into array in javascript or jQuery?
<p>I have some declare syntax problem here:</p>

<p>Say I have two object, one is call List and another is called Car. They have following interface:</p>

<pre><code>function List()
{
   .....some variables

   //bug point
   this.car = new Car();
}

function Car()
{
    this.make="";
    this.year="";
     ...
}
</code></pre>

<p>I hope to put a ARRAY of Car objects inside the List object. Now I know I could declare array by using</p>

<pre><code>var arr = new Array();
</code></pre>

<p>But that way I will have no chance to make this array a array of Car.</p>

<p>In otherwise, if I declare as this.car = new Car</p>

<p>Than I have no chance to make it an array....</p>

<p>I think I must be missed something. But I just can't get to it. Please help!</p>

<p>Thank you!</p>
