-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuiz2_JS_Basics.txt
97 lines (58 loc) · 1.77 KB
/
Quiz2_JS_Basics.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Interactivity for the Internet
Quiz 2: Javascript basics
1) Which of these is NOT a primitive data type? List all that apply.
a. boolean
b. null
c. container
d. class
Answer: ______
2) Which primitive data type can be described as a "data type for words and characters"
Answer: ______
3) Which of these will NOT work as a variable name? List all that apply.
a. 45myVariable
b. My_variable
c. my_variable1
d. cat
e. _1myVariable
Answer: ______
4) All unique variables require...
a. a number in the name
b. the text "myVariable"
c. a unique name
Answer: ______
5) Functions inside objects are called...
a. variables
b. methods
c. null
d. arrays
Answer: ______
6) Values that are passed into a function are called...
a. arguments or parameters
b. numbers
c. floats
d. booleans
Answer: ______
7) Which one of these is an array literal notation?
a. new Array();
b. ( ) Parenthesis
c. new Object();
d. [ ] Square brackets
Answer: ______
8) Which statements are TRUE? List all that apply.
a. a.push() is a method used to add a value at the end of an array.
b. a.push() is a method used to remove a value at the beginning of an array.
c. a.pop() is not a method of an array.
d. a.pop() is a method used to remove the last value of an array.
Answer: ______
9) Which statements are TRUE? List all that apply.
a. Objects contain key/value pairs.
b. Object keys are also known as property names.
c. Objects can only contain numbers.
d. Objects are the same as arrays.
Answer: ______
10) Which of these is an object literal notation?
a. { } Curly brackets
b. ( ) Parenthesis
c. new Object();
d. [ ] Square brackets
Answer: ______