How can I trim the leading and trailing comma in javascript?
<p>I have a string that is like below.</p>

<pre><code>,liger, unicorn, snipe,
</code></pre>

<p>how can I trim the leading and trailing comma in javascript?</p>
