JavaScript USES Substring to delete the last character of a string

  • 2020-03-26 21:45:31
  • OfStack

String STR = "a, b, c,";

We need to delete the last English comma. What should we do?

Methods:

1, the Substring

STR = STR. The Substring (0, s.L ength - 1)

Related articles: