Skip to content

Arrays : JS

Marie-Louise edited this page Dec 4, 2018 · 6 revisions

An array is a data type in javascript - can group data in a sequence...a sequence collection of data - can be referred to as list-li....

2:27 JavaScript uses integers called indices to identify the position The first item in an array is that index 0, the next item is at 1 and so on.

array = [item 1 ,item 2 ,item 3]
indices [  0 ,    1,      2   ]

Array.prototype.map()

when you use the array.map method you are using it to map each element of an array in to something else. For example a strings, objects etc.

String.prototype.split()

The split() method splits a String object into an array of strings by separating the string into substrings, using a specified separator string to determine where to make each split.

Clone this wiki locally