javascript-reference-data-types-2 Flashcards
1
Q
What is an array in JavaScript?
A
Object lets you store multiple values in a single variable.
2
Q
How do you create an array literal?
A
create a variable and then use [] brackets to list array within brackets in quotations
ex:
var colors
colors[“blue”, “green”]
3
Q
What are the keys for the values inside an array?
A
the name for each element within the array?
4
Q
Arrays have a property named length. Because arrays have a properties, what other data structure are they similar to?
A
Objects.