title: Return a certain index
body: <p>I have the code below, where the function getImageNum recieves an array with urls concatenated, so I split these urls on a symbol, so that I can get them separated.
  My variable res = path.split("-") holds the separated urls. So res[0] gives for example an url that looks like this: <a href="http://www.host.net/dir/file" rel="nofollow">http://www.host.net/dir/file</a>.
  But my problem is that I want to get every url in the res var, so that I can use it in a slide show. So instead of res[0], I wanna be able to use a variable that retains the different indexes automatically. See the code below for the idea.</p>
  
  <pre><code>function getImageNum(imageArray) { 
  var path;
  var res;
  var index = 0;
  
  for (i in imageArray) {
      path = imageArray[i];
  }
  
  res = path.split("-");
  
  $("#ContentPlaceHolder1_ContentPlaceHolder1_imageView").attr("src", res[index++]);
  }
  </code></pre>
  
  <p>The code: </p>
  
  <pre><code>$("#ContentPlaceHolder1_ContentPlaceHolder1_imageView").attr("src", res[index++]);
  </code></pre>
  
  <p>just returns the same image, and does not go through the entire res contents</p>