remove starting and ending comma from variable in javascript

后端 未结 4 1599
礼貌的吻别
礼貌的吻别 2021-02-13 04:18

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         


        
4条回答
提交回复
热议问题