JavaScript String substring() method

The JavaScript string substring() method retrieves the part of the given string on the basis of the specified index. The original string will not be modified. It is similar to slice, the only difference is that it does not support the negative index. Note: It returns the complete string if we do not pass any … Read more