title: How to add a comma in array.map after every element except last element in React JSX
body: <p>How can I add a trailing comma after every element of an array for making a list like:</p>
  
  <p><code>INV, INV, INV, INV</code></p>
  
  <p>Note that the last element doesn't have a trailing comma</p>
  
  <p>Currently iterating the list with <code>array.map</code>:</p>
  
  <pre><code>var List = React.createClass({
    render: function() {
      return (
        &lt;div&gt;
          {this.props.data.map(function(item) {
            return &lt;div&gt;{item}&lt;/div&gt;;
          })}
        &lt;/div&gt;
      );
    }
  });
  
  var data = ["red", "green", "blue"];
  
  React.render(&lt;List data={data} /&gt;, document.body);
  </code></pre>