title: Best Way to add Commas to NgFor List
body: <p>I've seen some possible solutions. Solution 1 works fine but with solution 2 it just repeated my array 5 times. </p>
  
  <pre><code>test: string[]= ['apple', 'banna', 'mango', 'orange', 'pear'];
  </code></pre>
  
  <p><strong>HTML Solution 1:</strong></p>
  
  <pre><code>&lt;p *ngFor="let x of test; let isLast=last"&gt;{{test}} {{isLast ? '' : ','}}&lt;/p&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OSHJ9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OSHJ9.png" alt="enter image description here"></a></p>
  
  <p><strong>HTML Solution 2</strong></p>
  
  <pre><code>&lt;p *ngFor="let x of test"&gt;{{test.join(",")}}&lt;/p&gt;
  </code></pre>
  
  <p>also tried this and did not work: </p>
  
  <pre><code>// &lt;p *ngFor="let x of test"&gt;{{x.join(",")}}&lt;/p&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/r9wUe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r9wUe.png" alt="enter image description here"></a></p>