Difference between revisions of "Substring"
From OdleWiki
(Created page with "`substring()` is a JavaScript method that extracts part of a string. It takes a starting index and an ending index. It extracts from (and including) the beginning i...") |
(No difference)
|
Latest revision as of 17:57, 11 January 2016
`substring()` is a JavaScript method that extracts part of a string. It takes a starting index and an ending index. It extracts from (and including) the beginning index through (and excluding) the ending index.
str."The President"(1,5);
returns "he P".
(Remember, JavaScript begins counting with 0.)