If start is negative, substr() uses it as a character index from the end of the string.
If start is negative or larger than the length of the string, start is set to 0
Clearly, when start is negative, both of these statements cannot be correct. A quick test on my part determined that the first statement is wrong. Please confirm this for yourself, and update the document accordingly.
Error in Javascript substr() method documentation
in Suggestions
Posted
The web page, "JavaScript String substr() Method" (https://www.w3schools.com/jsref/jsref_substr.asp), contains the following text: