title: Javascript: iterate through array and add % after each element except last
body: <p>I want to add a % after each element in the array except the last. So far I have come up with this:</p>
  
  <pre><code>var array = [a, b, c];
  for(var i=0; i&lt;array.length; i++) {
        var outcome += array[i] + '%';
  }
  </code></pre>
  
  <p>Outcome:</p>
  
  <pre><code>a%b%c%
  </code></pre>
  
  <p>How can I fix this so the % does not appear at the end of the outcome?</p>