i have the below variable in javascript. i want to remove the starting and ending \"comma\" sign using jquery/javascript
var test=\",1,2,3,4,\" <--- Expecte
test.substring(1, test.length - 1); should do it for you.
test.substring(1, test.length - 1);