String.prototype.substring

Returns the substring at the specified location within a string.

Syntax

substring(start, end?)

Parameters

Return value

A string.

Examples

"Green Day".substring(6)
"Day"
"Green Day".substring(0, 5)
"Green"