JavaScript Substring | JS Substring | Javascript Replace substring Tutorial By WDH

JavaScript Substring


JavaScript Substring
substring()
This method returns a subset of a string object.
Syntax
String.substring(indexA, [indexB])
Parameters:
indexA: An integer between 0 and one less than the length of the string.
indexB: (optional) An integer between 0 and the length of the string.
ReturnValue: 
The string method returns the new sub string based on given parameters.
Example
Output