Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96a78c2

Browse files
authored
Update LESSONPLAN.md
1 parent f322de5 commit 96a78c2

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

Week2/LESSONPLAN.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@ The purpose of this class is to introduce to the student:
1313

1414
FIRST HALF (12.00 - 13.30)
1515

16-
### 1. Q&A about last week's concepts & homework
16+
## 1. Q&A about last week's concepts & homework
1717
(Add more content)
1818

19-
### 2. The difference between statements & expressions
20-
##### Explanation
19+
## 2. The difference between statements & expressions
20+
### Explanation
2121
An expression is a piece of code that resolves in a value (becomes a value)
2222

2323
A statement is an instruction
24-
##### Example
24+
### Example
2525

26-
###### Expressions
26+
#### Expressions
2727
* `sum(a, b)`
2828
* `a`
2929
* `a > 4 ? "yes" : "no"`
3030
* `a + b`
3131
* `a && b || c`
3232

33-
###### statements
33+
#### statements
3434
* `let x;`
3535
* `if (a > 4) { return "yes"; } else { return "no"; }`
36-
##### Exercise
36+
### Exercise
3737

38-
###### 15. Indicate for each of these whether it is an expression or a statement:
38+
#### Indicate for each of these whether it is an expression or a statement:
3939

4040
1. `l`
4141
2. `l = 4;`
@@ -47,7 +47,7 @@ A statement is an instruction
4747
8. `function a() { return 4; }`
4848
9. `let a = function () { return 4; }`
4949

50-
###### Given the following code:
50+
#### Given the following code:
5151

5252
```js
5353
let s = "Hello".toLowerCase();
@@ -73,14 +73,14 @@ if (s2 == s1) {
7373
List all 11 *statements* in the code above
7474
List all 28 *expressions* in the code above (BONUS!)
7575

76-
##### Essence
76+
### Essence
7777
It's important to know the difference between expressions and statement because:
7878
1. It will give you an overview on what the code is about (is it an instruction or is code that resolves in a value)
7979
2. While writing code you'll not mix up the two and therefore make sure that you do not write wrong code.
8080

8181

82-
### 3. What are operators (comparison, arithmetic, logical, assignment)
83-
##### Explanation
82+
## 3. What are operators (comparison, arithmetic, logical, assignment)
83+
### Explanation
8484
An operator is capable of manipulating a certain value or operand. Operators are used to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands. In JavaScript operators are used for compare values, perform arithmetic operations etc. There are various operators supported by JavaScript:
8585

8686
* Arithmetic Operators
@@ -100,35 +100,34 @@ An operator is capable of manipulating a certain value or operand. Operators are
100100
assigns a value to its left operand based on the value of its right operand. The simple assignment operator is equal '='
101101

102102
(https://www.geeksforgeeks.org/javascript-operators/)
103-
##### Example
103+
### Example
104104
https://www.tutorialsteacher.com/javascript/javascript-operators
105-
##### Exercise
105+
### Exercise
106106
See example
107-
##### Essence
107+
### Essence
108108
Operators are very important in a programming language, because this is how we manipulate values.
109109
In fact, operators are the buildingblocks of all possible actions.
110110

111111

112112

113113
SECOND HALF (14.00 - 16.00)
114114

115-
### 4. What are loops (do/while & for loop)
116-
##### Explanation
115+
## 4. What are loops (do/while & for loop)
116+
### Explanation
117117
Programming loops are about doing the same thing over and over again. Another term for that is: iteration
118118

119119
Wikipedia: In most computer programming languages, a while loop is a (control flow) statement that allows (a block of) code to be executed repeatedly based on a given Boolean condition.
120120

121-
##### Example
122-
*images*
123-
##### Exercise
121+
### Example
122+
### Exercise
124123
Make a for loop with a do-while loop
125-
##### Essence
124+
### Essence
126125
In programming you have to do a lot of (alomst) similar calculations over and over again. Using loops makes it iesier (and less boring) to code. Next to that it makes sure the the code is much more compact.
127126

128127
You can check: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Looping_code as well. underneath the paragraph: 'Why bother'
129128

130129
5. What are conditional statements (if/else & switch)
131-
##### Explanation
130+
### Explanation
132131
The normal order of execution of statements in a computer program is in straight-line order, from top to bottom. However, sometimes it is desirable to execute one or more statements conditionally, i.e. depending on whether some condition – determined by the state of your program – holds true (Boolean expression).
133132

134133
In its simplest form the `if` statement looks like this:
@@ -153,17 +152,17 @@ if() {
153152

154153
The switch statement can sometimes be a useful alternative to a concatenation of if statements. This is the case when the condition is an expression that can be decomposed into a number of distinct values or cases, as shown in the example below.
155154

156-
##### Example
155+
### Example
157156
```js
158157
if (distance < 10) {
159158
console.log('I will take the bike.');
160159
}
161160
```
162161

163162

164-
##### Exercise
163+
### Exercise
165164
https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/Statements/if...else
166165

167166

168-
##### Essence
167+
### Essence
169168

0 commit comments

Comments
 (0)