W3Schools
w3schools.com › jsref › jsref_substring.asp
JavaScript String substring() Method
The substring() method does not change the original string. If start is greater than end, arguments are swapped: (4, 1) = (1, 4). Start or end values less than 0, are treated as 0. ... Coding fundamentals as a game.
Spaces
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
Academy
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
Practice
Practice coding problems on W3Schools. Write code, submit, and get instant feedback.
Python For Loops
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
W3Schools
w3schools.com › jsref › jsref_substr.asp
JavaScript String substr() Method
The substr() method is removed (deprecated) in the latest JavaScript standard. Use substring() or slice() instead. ... Coding fundamentals as a game. Bite-sized lessons and challenges.
17:05
Substring in JavaScript | Substring vs Substr vs Slice Method ...
06:15
slice vs substring method | String Object In JavaScript - YouTube
02:27
JavaScript Basics - substr() - YouTube
13:12
Como funciona o Substring do Javascript - YouTube
05:39
JavaScript Substring Example | Slice, Substr, and Substring Methods ...
W3Schools
w3schools.com › js › js_string_methods.asp
JavaScript String Methods
If you omit the second parameter, substring() will slice out the rest of the string.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › String › substring
String.prototype.substring() - JavaScript - MDN Web Docs
The substring() method of String values returns the part of this string from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.
W3Schools
www-db.deis.unibo.it › courses › TW › DOCS › w3schools › jsref › jsref_substring.asp.html
JavaScript String substring() Method
The substring() method extracts the characters from a string, between two specified indices, and returns the new sub string.
W3Schools
w3schools.com › js › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
W3Schools
w3schoolsua.github.io › js › js_string_methods_en.html
JavaScript String Methods. Examples. Lessons for beginners. W3Schools in English
If you omit the second parameter, substring() will slice out the rest of the string.
W3Schools
w3schools.sinsixx.com › jsref › jsref_substring.asp.htm
JavaScript substring() Method - SinSiXX - W3Schools
Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building.
Busitema
capfoe.library.busitema.ac.ug › modules › en-w3schools › content › jsref › jsref_substring.html
JavaScript String substring() Method
The substring() method extracts the characters from a string, between two specified indices, and returns the new sub string.
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-string-substring-method
JavaScript String substring() Method - GeeksforGeeks
If only the starting index is provided, substring() will return the substring from that index to the end of the string. ... Like most string methods in JavaScript, substring() does not alter the original string.
Published: January 16, 2026
Associationreins
associationreins.com › development › code-examples › javascript › string.substring+javascript+w3schools
string.substring javascript w3schools Code Example
var result = a.substring(4, 5); ... javascript create a function that counts the number of syllables a word has.
W3Schools
w3schools.com › jsref › tryjsref_substring.htm
JavaScript Strings
The substring() Method · substring() extracts a part of a string:
W3Schools
w3schools.com › jsref › jsref_sub.asp
JavaScript String sub() Method
String sub() is deprecated in JavaScript. Avoid using it. ... Ad-free learning, track your progress, earn XP, streaks, compete in leagues, build and host websites, unlock coding challenges, and much more!
JavaScript Tutorial
javascripttutorial.net › home › javascript string methods › string.prototype.substring()
JavaScript Substring(): Extract a Substring from a String
November 3, 2024 - Then the substring returns the domain that starts from the index of @ plus 1 to the end of the string. The JavaScript substring() method returns the substring from the start index up to and excluding the end index.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › String › substr
String.prototype.substr() - JavaScript - MDN Web Docs
2 weeks ago - The substr() method of String values returns a portion of this string, starting at the specified index and extending for a given number of characters afterwards.
Codecademy
codecademy.com › docs › javascript › substring
JavaScript | Substring | Codecademy
May 29, 2025 - The .substring() method in JavaScript extracts a portion of a string from one position to another (exclusive) and returns a new string.
W3Schools
w3schools.com › js › js_string_search.asp
JavaScript String Search
For a complete reference to all JavaScript properties and methods, with full descriptions and many examples, go to: W3Schools' Full JavaScript Reference.