
ArraysDRAFT
K - University grade
124 times
Computers
50%average accuracy
var groceries = ["milk", "sugar", "eggs", "cake"];
What is the value of groceries[2]
in the above array?v
ar shoppingList = ["milk", "eggs", "sugar", "bread", "cake"];
What is the index of the item "bread"
in the array shoppingList
?var arr = [1, 4, 55, 23, 11, 2];
What is the value of arr.length
?var firstElement = ...
Which statement will store the first element of an array arr
inside of the variable firstElement
?var lastElement = ...
Which statement will store the last element of an array arr
inside of the variable lastElement
?