String.prototype.substr() - JavaScript | MDN - MDN Web Docs
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr
Web ResultSep 12, 2023 · For example, str.substr (a, l), str.slice (a, a + l), and str.substring (a, a + l) all have different results when str = "01234", a = 1, l = -2 — substr () returns an empty string, slice () returns "123", while substring () returns "0". The actual refactoring path depends on the knowledge of the range of a and l. Examples. …
DA: 57 PA: 67 MOZ Rank: 7