You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**7. What are `name` and `age` of the object `joe`?**
91
+
92
+
A. Index
93
+
B. Key
94
+
C. Object
95
+
D. Property
96
+
97
+
----
61
98
62
99
### Given the following code:
63
100
@@ -67,32 +104,45 @@ var x = [1, 2, 3];
67
104
var z = x[y];
68
105
```
69
106
70
-
What is `y`:
107
+
**7. What is `y`**
71
108
72
-
A. Index
73
-
B. Key
74
-
C. Index or key
75
-
D. Array
109
+
A. Index
110
+
B. Key
111
+
C. Index or key
112
+
D. Array
76
113
114
+
**8. What is the element for index `1` in array `x`?**
77
115
78
-
### What is the name of these functions?
116
+
**9. Fill in: "The value of the (...) `length`of `x` is (...)"**
79
117
80
-
A. `function a() { return true; }`
81
-
B. `var a = function b() { return true; }`
82
-
C. `var c = function () { return true; }`
118
+
----
83
119
84
-
### Write a function that has two parameters called `first` and `second`
120
+
### 10. What is the name of these functions?
85
121
86
-
### Write a function call that passes three arguments.
122
+
A. `function a() { return true; }`
123
+
B. `var a = function b() { return true; }`
124
+
C. `var c = function () { return true; }`
87
125
88
-
### Write code for the following
126
+
----
89
127
90
-
A. Declare a variable called `x` and initialize it with the string "Hello".
91
-
B. Declare a variable called `y` and initialize it with the property `length` of `x`.
92
-
C. Declare a variable called `z` and initialize it with the result of calling the method `toUpperCase` on `x`
93
-
D. Declare a function called `myFunction`. This function should take two arguments, and should call the second argument with the first argument as its argument. Then, declare a variable called `f` and initialize it with an empty anonymous function, and call `myFunction` with the arguments `10` and `f`.
128
+
### 11. Write a function that has two parameters called `first` and `second`
94
129
95
-
### Explain as precisely as possible (in English) what the following code does, line by line
130
+
----
131
+
132
+
### 12. Write a function call that passes three arguments.
133
+
134
+
----
135
+
136
+
### 13. Write code for the following
137
+
138
+
A. Declare a variable called `x` and initialize it with the string "Hello".
139
+
B. Declare a variable called `y` and initialize it with the property `length` of `x`.
140
+
C. Declare a variable called `z` and initialize it with the result of calling the method `toUpperCase` on `x`
141
+
D. Declare a function called `myFunction`. This function should take two arguments, and should call the second argument with the first argument as its argument. Then, declare a variable called `f` and initialize it with an empty anonymous function, and call `myFunction` with the arguments `10` and `f`.
142
+
143
+
----
144
+
145
+
### 14. Explain as precisely as possible (in English) what the following code does, line by line
96
146
97
147
(Tip: it should look like the items in the previous question!)
98
148
@@ -104,27 +154,29 @@ var s = sum(4, 5);
104
154
var r =Math.sqrt(s);
105
155
```
106
156
157
+
----
107
158
108
-
##Arrays & objects
159
+
### 15. Indicate for each of these whether it is an expression or a statement:
109
160
161
+
A. `l`
162
+
B. `l = 4;`
163
+
C. `l == 4`
164
+
D. `if (l == 4) { console.log("yes"); }`
165
+
E. `console.log("yes");`
166
+
F. `"yes"`
167
+
G. `console.log(l == 4 ? "yes" : "no")`
168
+
H. `function a() { return 4; }`
169
+
I. `var a = function () { return 4; }`
110
170
111
-
## Statements & expressions
171
+
----
112
172
113
-
### Indicate for each of these whether it is an expression or a statement:
173
+
### 16. How can you tell whether something is a statement?
114
174
115
-
A. `l`
116
-
B. `l = 4;`
117
-
C. `l == 4`
118
-
D. `if (l == 4) { console.log("yes"); }`
119
-
E. `console.log("yes");`
120
-
F. `"yes"`
121
-
G. `console.log(l == 4 ? "yes" : "no")`
122
-
H. `function a() { return 4; }`
123
-
I. `var a = function () { return 4; }`
175
+
----
124
176
125
-
### How can you tell whether something is a statement?
177
+
### 17. How can you tell whether something is an expression
126
178
127
-
### How can you tell whether something is an expression
179
+
----
128
180
129
181
### Given the following code:
130
182
@@ -149,5 +201,6 @@ if (s2 == s1) {
149
201
}
150
202
```
151
203
152
-
A. List all 11 *statements* in the code above
153
-
B. List all 23 *expressions* in the code above (BONUS!)
204
+
**18. List all 11 *statements* in the code above**
205
+
206
+
**19. List all 23 *expressions* in the code above (BONUS!)**
0 commit comments