This wiki is for the exclusive use of my friends and colleagues. Account creation and anonymous editing have been turned off.

If you are a friend or colleague of mine, and would like to participate in this project, please send me a message.

If you find these pages useful, please donate to help cover server costs. Thanks!

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.)