JavaScript · Strings
str.substring()
Like slice but swaps arguments when start is greater than end and does not accept negatives.
Syntax
str.substring(start, end)Example
Try it
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.