title: How to pick first three elements of an array and construct a comma seperated String
body: <p>I have an array of fruits. I want to construct a comma separated string of this array for first three elements only. Right now, I am constructing a comma separated string for all.</p>
  
  <pre><code>var fruits = [];
  
  fruits.push("Banana");
  fruits.push("Orange");
  fruits.push("Apple");
  fruits.push("Mango");
  fruits.push("Orange");
  fruits.push("Papya");
  fruits.push("CALAPPLE");
  
  var result = fruits.toString();
  
  alert(result);
  </code></pre>
  
  <p>Could you please let me know how to achieve this? This is <a href="https://jsfiddle.net/qna8sbf7/1/" rel="nofollow">my jsfiddle</a>.</p>