DEV Community

Discussion on: string.prototype.substring() vs string.prototype.substr()

Collapse
 
mang0088 profile image
Nikunj

Great post.
Overall, the arguments of substring() represent the starting and ending indexes, while the arguments of substr() represent the starting index and the number of characters to include in the returned string.