title: Remove trailing character(s) from string in Javascript
body: <p>What is an acceptable way to remove a particular trailing character from a string?</p>
  
  <p>For example if I had a string:</p>
  
  <pre><code>&gt; "item,"
  </code></pre>
  
  <p>And I wanted to remove trailing ','s only if they were ','s?</p>
  
  <p>Thanks!</p>