1/15
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Arrays can store multiple, related pieces of information.
True
False
True
Array indexes start with 0. [0] is the first element. [1] is the second element, etc.
True
False
True
Arrays can store multiple, related pieces of information, but they must all be of the same type (String, Object, etc.).
True
False
False
Which is the proper way to declare an array?
var grades= (80, 87, 94, 82, 62, 98, 81, 81, 74, 91)
var grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]
array grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]
grades= Array(80, 87, 94, 82, 62, 98, 81, 81, 74, 91)
var grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]
Every index in an array must be a numeric value.
True
False
True
Elements are referenced by index.
True
False
True
In JavaScript the first index in an array is 0.
True
False
True
What is the value of the element in position 4?
12 45 32 56 1 12 10
1
What is the index of the element with the value of 10?
12 45 10 56 1 14 12
2
var my_array = [2, 4, 6, 8, 10]
What is the value of my_array[2] ?
2
4
6
8
10
Undefined
6
var my_array = [2, 4, 6, 8, 10]
What is the value of my_array.length ?
5
4
Undefined
5
JavaScript Arrays have attributes and methods.
True
False
True
When declaring an array Spaces and line breaks are important. A declaration can not span multiple lines.
True
False
False
Which of these is not valid? (Hint, pay attention to if the method should return one thing, or many things...)
var my_array = document.getElementsByTagName(tagName)
first_element = my_array[0]
var my_array = document.getElementsByClassName(className)
first_element = my_array[0]
var my_array = document.querySelector(#idName)
first_element = my_array[0]
var my_array = document.querySelector(#idName)
If your browser supports debugging, you can use which of the following to display JavaScript values in the debugger window:
console.debug
document.log
document.debug
console.log
console.log
How do you properly access the third element in an array variable named "fruit"?
[fruit]3
fruit[3]
fruit_3
None of the above
fruit[3]