substring()Extracts a part of the text.Syntaxtext.substring(start, end)DescriptionReturns substring from start to end (exclusive).ExampleLoading editor…▶ Try it yourselfExpected outputHexWhen to use?First N characters, truncation.Related commandslength()split() / contains()← toUpperCase() / toLowerCase()split() / contains() →