Working with Arrays Flashcards
(12 cards)
What are Arrays used for?
Arrays are used for grouping and ordering individual related items.
Can you assign an Array to a Variable?
Yes, you can assign an Array to a Variable.
What is each item in an Array known as?
Each item in an Array are known as Elements.
How are Arrays Declared?
Arrays are Declared Using Square Brackets.
Are the Elements in an Array comma-seperated?
Yes, Elements in an Array are Comma Seperated.
Can Elements be of any Data Type?
Yes, elements can be of any Data Type.
what is const smoothieIngredients = [‘apple’,’strawberry’,’pear’,’kiwi’]; an example of?
This code is an example of an Array.
Does the order in which we declare elements within an array matter?
Yes, the order of elements placed within an array matters.
Are Arrays Zero-Indexed?
Yes, Arrays are Zero Indexed.
How can we access the value of the element within an Array?
We can access it using it’s index position contained within the square brackets.
Do Arrays have a length.property?
Yes, arrays have a length.property.