-
Notifications
You must be signed in to change notification settings - Fork 0
Arrays : JS
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 ]
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.
The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value.
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.