The substring method extracts a string from the specified string, starting at the given location. An optional second parameter indicates the position of the first character you DON'T want.
Code and Output: