ARRAYS Flashcards
What is an Array?
Arrays are JavaScript’s way of making lists. Arrays can store any data types (including strings, numbers, and booleans). Like lists, arrays are ordered, meaning each item has a numbered position.
How to create an Array ?
Is to use an array literal. An array literal creates an array by wrapping items in square brackets [].
Remember, arrays can store any data type — we can have an array that holds all the same data types or an array that holds different data types.
How is called the content item in an array ?
Each content item inside an array is called an element.
What is the keyword for position of each item in an array?
An index
How to access one fo the item of an array ?
We can access one item in an array using its index, with syntax like: myArray[0].
What do the method .pop() ?
Remove items from an array
What do the method .push()?
Add a items to an array