Please enable JavaScript.
Coggle requires JavaScript to display documents.
JavaScript: Arrays - Coggle Diagram
JavaScript: Arrays
methods
-
-
-
-
.slice() - copy part of array, defined by start and end arguments - index, only make copy not change original array
-
-
.join() - combine all elements of array as one full string, argument setup character between of elements - default is ','
-
array is ordered list, syntax
let array = [element1, element2];
-
-
-
-
let and const work also for arrays, elements of arrays declared by const can be changed but cannot be re-assign
-
it's possible to change array by passing it through function, in function use some method to change array, after running of function array still keep changes
it's possible to store array in array - it's called nested array, to return specific element from nested array it's required to use chain of [index][index] from both arrays