function getImages(n){ for( var image, array = [], i = 1; i <= n; i++ ){ image = new Image; image.src = "images/" + i + ".jpg"; array.push( image ); }; return array; };