Term pt.2(Arrays) Flashcards
Arrays
An array is a single variable that is used to store different elements. You start an array declaration with an opening and closing square bracket
Array Indexes
Array indexes are used to access the data inside arrays. Arrays use zero-based indexing.
Multi-Dimensional Array
Is an array or arrays or a multi-leveled array.
Push()
An array function. The push() function is a way to append or push data to the end of the array.
Pop()
Another array function. The pop() function is used to remove or pop a value off the end of an array and returns that element or data.
Shift()
Another array function. The shift() function removes or shifts the first element of the array, the opposite of the pop() function.
Unshift()
Another array function. Unshift() adds data to the beginning of an array, the opposite of push().
Zero-based Indexing
Zero-based indexing is the indexing that array uses to count data. Which means you count from 0 instead of 1.