Useful Functions

From rbachwiki
Revision as of 20:18, 26 November 2016 by Bacchas (talk | contribs) (Created page with "== Map function == ''' will duplicate an array to another'' == Splice == == indexOf == == Split == ''' Used to split text given a delimiter into an array of substrings'''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Map function

' will duplicate an array to another

Splice

indexOf

Split

Used to split text given a delimiter into an array of substrings

var myText = 'hello-1'
var mysplit = myText.split('-')

Will Yield

['hello', 1]

Slice