title: Create and Load Images using a loop in Javascript
body: <p>my apologies but I am a severe novice. </p>
  
  <p>please can someone tell me how it is possible to use a loop to load images?</p>
  
  <p>i.e. rewrite the following type of code to use a loop to automate the process. </p>
  
  <pre><code>function loadimages() {
      pic00 = new Image;
      pic00.src = "images/IMG_0019.jpg";
  
      pic01 = new Image;
      pic01.src = "images/IMG_0020.jpg";
  
      pic02 = new Image;
      pic02.src = "images/IMG_0021.jpg";
  
      pic03 = new Image;
      pic03.src = "images/IMG_0022.jpg";
  
      pictures = new Array(4);
      pictures[0] = pic00;
      pictures[1] = pic01;
      pictures[2] = pic02;
      pictures[3] = pic03;
  }
  </code></pre>
  
  <p>I have seen may posts that describe similar things but i'm afraid i'm too dumb to understand them. Any help appreciated. </p>
  
  <p>Regards</p>