+ 1
What is the deference between subString() and substr()?
The substr() method extract the string in a string and the subString() is the same extract string
2 Respuestas
0
The difference is in the second argument. The second argument to substring is the index to stop at (but not include), but the second argument to substr is the maximum length to return.
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_substring
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_substr