title: How to remove extra occurrences of a letter in a string?
body: <p>Using Javascript is there a way to remove extra occurrences of a specific letter in a string?</p>
  
  <p>For example:</p>
  
  <pre class="lang-js prettyprint-override"><code>remove_extra('a', 'caaaat')
  //=&gt; 'cat'
  </code></pre>
  
  <p>I know there must be a brute force way to do something like this but is there an elegant way?  I'm not sure how to approach this algorithm.</p>