title: remove starting and ending comma from variable in javascript
body: <p>i have the below variable in javascript. i want to remove the starting and ending "comma" sign using jquery/javascript</p>
  
  <pre><code>var test=",1,2,3,4," &lt;--- 
  
  Expected output: var test="1,2,3,4"
  </code></pre>
  
  <p>please advice</p>