i want to display random images with js, my code as follows
var imageList=new Array();
imageList[0]="img1.jpg";
imageList[1]="img2.jpg";
imageList[2]="img3.jpg";
imageList[3]="img4.jpg";
var imageChoice=Math.floor(Math.random*imageList.length);
document.write('<img src="'+imageList[imageChoice]+'"' );