How do i declare this and set values later? (javascript)
<p>This is the code I have and it is not working. I dunno how to declare this</p>

<pre><code>    var input = {
        container: '.slide_container',
        container_all: '.slide_show',
        slides: []
    };

    var $slides = $('.slide_show .slide');
    var l = $slides.length;

    for( var i = 0; i &lt; l; i++ ) {
        input.slides[i].el = '#' + $slides.eq(i).attr('id');
        if( i === 0 ) {
            input.slides[i].weight = 1;
        } else {
            input.slides[i].weight = 0;
        }
    }
</code></pre>

<p>When it gets to </p>

<pre><code>input.slides[i].el = '#' + $slides.eq(i).attr('id');
</code></pre>

<p>it says the input.slides[i].el is undefined. Can someone let me know the correct way to declare the empty slides? </p>
