string
var basic = "abc,def,ghi,";
The first
basic = basic.substr(0, basic.length - 1);
the second
basic = basic.substring(0, basic.length - 1);
the third
basic = basic.substring(0, basic.lastIndexOf(','));
string
var basic = "abc,def,ghi,";
The first
basic = basic.substr(0, basic.length - 1);
the second
basic = basic.substring(0, basic.length - 1);
the third
basic = basic.substring(0, basic.lastIndexOf(','));