JavaScript USES Substring to delete the last character of a string


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)