Substring
From OdleWiki
Revision as of 17:57, 11 January 2016 by Kenneth John Odle (talk | contribs) (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...")
`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.)