title: JavaScript split and add a string
body: <p>how to insert a string inside the url address after split ?
  I have a simple code like this, but I just don't understand how split and join are work
  I have tried "append" function but I can't get it right
  I test and write it in
  <a href="http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_split" rel="nofollow">http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_split</a></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
      &lt;script type="text/javascript"&gt;
  
          var str="/image/picture.jpg";
          var test = str.split("/");
          for(var i = 0; i &lt; test.length; i++) {
               document.write(test[1].join('/original') + "&lt;br /&gt;");     
          }
          document.write(test);
  
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>the output that I want is simply like this :</p>
  
  <blockquote>
    <p>"/image/original/picture.jpg"</p>
  </blockquote>
  
  <p>note: thanks for the help.</p>