Home >Web Front-end >JS Tutorial >Using Substring to delete the last character of a string in JavaScript_javascript tips
String str = "a,b,c,";
We need to delete the last English comma, what should we do?
Method:
1. Substring
str=str.Substring(0,s.Length-1)