Array syntax error newbie
<p>I am lost in this error. I am trying to write a function and write a array in that function. in an external js file. This is going to be a random image loading function but i keep getting an error with the array and can't figure out why.</p>

<pre><code>function  randImg(){
    var imgs = new Array(); 
    img[0]="banner1.png";
    img[1]="banner2.png";
    img[2]="banner3.png";
    var maxium = img.length;
}
</code></pre>

<p>I am getting the error on the var imgs line. any ideas?</p>

<p>Here is my new code calling the variable "img" was throwing me off it loads ok but it only prints out the text in the variable and not the actually file!? so at run it say "banner1.png" or "banner3.png"? any thoughts</p>

<pre><code>function randImg(){
var banner = new Array();
banner[0] = "banner1.png";
banner[1] = "banner2.png";
banner[2] = "banner3.png";
var maxImg = banner.length;
var randNum = Math.floor(Math.random()*maxImg);
return banner[randNum];
}
</code></pre>
