Skip to content

Commit 2fab2d2

Browse files
rephrased some questions, and use proper ul elements
1 parent b5e7fb2 commit 2fab2d2

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

fundamentals/exercises.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@ var x = s.toLowerCase();
88
var l = s.length;
99
```
1010

11-
**1. Indicate the type of each:**
11+
**1. What are the types of the following:**
1212

13-
A. `s`
14-
B. `x`
15-
C. `s.toLowerCase( )`
16-
D. `s.toLower Case`
17-
E. `s.length`
18-
F. `l`
13+
1. `s`
14+
2. `x`
15+
3. `s.toLowerCase( )`
16+
4. `s.toLower Case`
17+
5. `s.length`
18+
6. `l`
1919

2020
----
2121

2222
### 2. In `var x = 5 + 6;`, what is `+`?
2323

24-
A. Function
25-
B. Operator
26-
C. Number
27-
D. Aggregator
24+
1. Function
25+
2. Operator
26+
3. Number
27+
4. Aggregator
2828

2929
----
3030

31-
### 3. In `var x = 5 + 6;`, what is 'var'?
31+
### 3. In `var x = 5 + 6;`, what is `var`?
3232

33-
A. Variable
34-
B. Keyword
35-
C. Operator
36-
D. Constant
33+
1. Variable
34+
2. Keyword
35+
3. Operator
36+
4. Constant
3737

3838
----
3939

@@ -45,10 +45,10 @@ var x = z[y];
4545

4646
**4. What is `y`?**
4747

48-
A. Index
49-
B. Key
50-
C. Index or key
51-
D. Array
48+
1. Index
49+
2. Key
50+
3. Index or key
51+
4. Array
5252

5353
----
5454

@@ -62,10 +62,10 @@ var z = x[y];
6262

6363
**5. What is `y`?**
6464

65-
A. Index
66-
B. Key
67-
C. Index or key
68-
D. Array
65+
1. Index
66+
2. Key
67+
3. Index or key
68+
4. Array
6969

7070
----
7171

@@ -82,17 +82,17 @@ var joesAge = joe['age'];
8282

8383
**6. What is `'age'` in the last line?**
8484

85-
A. Index
86-
B. Key
87-
C. Property
88-
D. Object
85+
1. Index
86+
2. Key
87+
3. Property
88+
4. Object
8989

9090
**7. What are `name` and `age` of the object `joe`?**
9191

92-
A. Index
93-
B. Key
94-
C. Object
95-
D. Property
92+
1. Index
93+
2. Key
94+
3. Object
95+
4. Property
9696

9797
----
9898

@@ -106,10 +106,10 @@ var z = x[y];
106106

107107
**7. What is `y`**
108108

109-
A. Index
110-
B. Key
111-
C. Index or key
112-
D. Array
109+
1. Index
110+
2. Key
111+
3. Index or key
112+
4. Array
113113

114114
**8. What is the element for index `1` in array `x`?**
115115

@@ -119,9 +119,9 @@ D. Array
119119

120120
### 10. What is the name of these functions?
121121

122-
A. `function a() { return true; }`
123-
B. `var a = function b() { return true; }`
124-
C. `var c = function () { return true; }`
122+
1. `function a() { return true; }`
123+
2. `var a = function b() { return true; }`
124+
3. `var c = function () { return true; }`
125125

126126
----
127127

@@ -135,10 +135,10 @@ C. `var c = function () { return true; }`
135135

136136
### 13. Write code for the following
137137

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`.
138+
1. Declare a variable called `x` and initialize it with the string "Hello".
139+
2. Declare a variable called `y` and initialize it with the property `length` of `x`.
140+
3. Declare a variable called `z` and initialize it with the result of calling the method `toUpperCase` on `x`
141+
4. 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`.
142142

143143
----
144144

@@ -158,10 +158,10 @@ var r = Math.sqrt(s);
158158

159159
### 15. Indicate for each of these whether it is an expression or a statement:
160160

161-
A. `l`
162-
B. `l = 4;`
163-
C. `l == 4`
164-
D. `if (l == 4) { console.log("yes"); }`
161+
1. `l`
162+
2. `l = 4;`
163+
3. `l == 4`
164+
4. `if (l == 4) { console.log("yes"); }`
165165
E. `console.log("yes");`
166166
F. `"yes"`
167167
G. `console.log(l == 4 ? "yes" : "no")`

0 commit comments

Comments
 (0)