Core JavaScript

Intermediate JavaScript

JavaScript Reference

JavaScript substr() Method/Function Example - Get SubString



JavaScript substr() function get the sub string from two specified position parameter value.

Syntax

string.substr(start,length)

Example-Code:

Example-Results: