title: how to sort an array of numbers in javascript making sure that the first count finished before adding duplicates?
body: <p>I have this array of numbers that i am working with that currently look this;</p>
  
  <pre><code>count = [1,4,3,1,2,3,4,5,6,2,3,5,7];
  </code></pre>
  
  <p>How can i transform and sort it to make it look like this;</p>
  
  <pre><code>count = [1,2,3,4,5,6,7,1,2,3,3,4,5];
  </code></pre>
  
  <p>Please help, any idea out there on how to approach this?</p>