am concatinating a string inside a for loop
var s="";
for(var i=1;i<=10;i++)
{
s=s+"'"+"id"+i+"',";
}
document.write(s);
Output I got is
'id1','id2','id3','id4','id5','id6','id7','id8','id9','id10',
I am trying to get the result as
'id1','id2','id3','id4','id5','id6','id7','id8','id9','id10'
How can I remove the extra ,
added an the end?