Introduction : in JS, sometimes require string concatenation, and the string in some splicing delimited, in the spliced end of the string will be more of a separator, then we can take the following methods to remove the end delimiter.
Method a: using substring () and lastIndexOf ()
Option two: substring () and length properties
Method three: Using regular expressions