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

Skip to content

Commit 6040b1a

Browse files
committed
add exercises to part 2
1 parent 2155cb2 commit 6040b1a

File tree

2 files changed

+81
-30
lines changed

2 files changed

+81
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Week1/LESSONPLAN.md

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

1414
## Core concepts
1515

16-
*FIRST HALF (12.00 - 13.30)*
16+
_FIRST HALF (12.00 - 13.30)_
1717

1818
## 1. The 2 types of websites: static vs. dynamic
1919

2020
### Explanation
2121

22-
Static websites usually come with a fixed number of pages that have a specific layout. When the page runs on a browser, the content is literally static and doesn’t change in response to user actions. A static website is usually created with HTML and CSS
22+
Static websites usually come with a fixed number of pages that have a specific layout. When the page runs on a browser, the content is literally static and doesn’t change in response to user actions. A static website is usually created with HTML and CSS
2323
Compared to static websites, which are purely informational, a dynamic website is more functional. It allows users to interact with the information that is listed on the page. Of course, that requires utilizing more than just HTML code.
2424

2525
### Example
@@ -45,23 +45,31 @@ Discuss in class which claim belongs to which type of website:
4545
Feature of Content Management System.
4646
HTML, CSS, Javascript is used for developing the website.
4747
Same content is delivered everytime the page is loaded.
48-
48+
49+
<<<<<<< HEAD
50+
4951
### Essence
5052

53+
=======
54+
55+
##### Essence
56+
57+
> > > > > > > add exercises to part 2
58+
5159
[In the link is an article with (dis)advantages of both static and dynamic websites.](https://www.spiderwriting.co.uk/static-dynamic.php)
52-
53-
Static:
60+
61+
Static:
5462
Advantage:
5563
- Flexible
5664
- Cheaper
5765
Disadvantages:
5866
- not updating content
5967
- Scalability
60-
68+
6169
Dynamic:
6270
Advantage:
63-
- Easy to pull in data on stuctured and organised way
64-
- Content management system
71+
- Easy to pull in data on stuctured and organised way
72+
- Content management system
6573
Disadvantage:
6674
- Design is more fixed, becasue the pages are more of a template
6775
- Costs
@@ -104,9 +112,16 @@ It doesn't exhibit any dynamic behaviour like:
104112
1. rendering complex animations
105113
1. sending requests over network to servers and fetching a response
106114
1. and this is where JavaScript steps in.
107-
115+
<<<<<<< HEAD
116+
108117
## 3. What are variables (const & let) & naming conventions
109118

119+
=======
120+
121+
#### 3. What are variables (const & let) & naming conventions
122+
123+
> > > > > > > add exercises to part 2
124+
110125
### Explanation
111126

112127
In JavaScript, there are three ways of creating variables.
@@ -127,6 +142,7 @@ Three different stages of working with variables are:
127142
- Variable assignment means throwing away the old value of a variable and replacing it with a new one. Initialization can be thought of as a special way of assignment.
128143

129144
https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/variables.md
145+
130146
### Example
131147

132148
```javascript
@@ -169,12 +185,13 @@ console.log(lastName);
169185
### Exercise
170186

171187
1. Create 2 variables using the `let` keyword
172-
1. make 1 variable contain your first name
173-
1. the second variable should have no value assigned
174-
188+
189+
1. make 1 variable contain your first name
190+
1. the second variable should have no value assigned
191+
175192
1. Make 2 variables using the `const` keyword
176-
1. the first variable should contain the city you currently stay at
177-
1. come up with a value for the second variable yourself
193+
1. the first variable should contain the town/city you currently stay at
194+
1. come up with a value for the second variable yourself
178195

179196
### Essence
180197

@@ -184,14 +201,16 @@ For example, your name and age are simple pieces of information, a string and a
184201

185202
Variables are simply named storage/pointer for this information.
186203

187-
*SECOND HALF (14.00 - 16.00)*
204+
_SECOND HALF (14.00 - 16.00)_
188205

189206
## 4. The basic data types (string, boolean, number, undefined, null)
190207

191208
### Explanation
192-
Primitive data types are typically types that are built-in or basic to a language implementation.
193209

194-
There are 5 different types of data. The compiler/computer interpretates all the variables we make as one of those datatypes.
210+
> > > > > > > add exercises to part 2
211+
> > > > > > > Primitive data types are typically types that are built-in or basic to a language implementation.
212+
213+
There are 5 different types of data. The compiler/computer interprets all the variables we make as one of those datatypes.
195214
(https://javascript.info/types)
196215

197216
Boolean — true or false
@@ -200,40 +219,71 @@ Undefined — a declared variable but hasn’t been given a value
200219
Number — integers, floats, etc
201220
String — an array of characters i.e words
202221
?? Symbol — a unique value that's not equal to any other value ??
222+
203223
### Example
204-
* `string`, e.g. "HackYourFuture"
205-
* `number`, e.g. 5, or 10.6
206-
* `boolean`, e.g. `true` or `false`
207-
* `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
208-
* `null and undefined` The values `null` and `undefined` are very similar in JavaScript, but they behave a bit differently. The difference is that `null` always has type "object", and `undefined` always has type "undefined".
209224

210-
Whenever you declare a variable, but you don't set a value, the variable will become `undefined`. JavaScript will never make a variable `null` unless you explicitly program it.
211-
* `symbol`
225+
- `string`, e.g. "HackYourFuture"
226+
- `number`, e.g. 5, or 10.6
227+
- `boolean`, e.g. `true` or `false`
228+
- `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
229+
- `null`
230+
- `undefined`
231+
The values `null` and `undefined` are very similar in JavaScript, but they behave a bit differently. The difference is that `null` always has type "object", and `undefined` always has type "undefined".
212232

233+
Whenever you declare a variable (using `let`), but you don't set a value, the variable will become `undefined`. JavaScript will never make a variable `null` unless you explicitly program it.
234+
235+
- `symbol`
213236

214237
```js
215238
let x = 5;
216239
let typeOfX = typeof x; // -> "number"
217240
```
218241

219-
220242
### Exercise
221-
Everybody has two minutes to find a way to declare all basic data types by making use of the typeof operator:
243+
244+
Everybody has two minutes to find a way to declare all basic data types by making use of the typeof operator:
245+
222246
```js
223247
let x = 5;
224248
let typeOfX = typeof x; // -> "number"
225249
```
226-
### Essence
227-
In this way we can store a lot of data in a compact way, while the computer/compiler knows how to interpretate the 1's and 0's/
250+
251+
##### Essence
252+
253+
In this way we can store a lot of data in a compact way, while the computer/compiler knows how to interpret the 1's and 0's/
228254

229255
## 5. The compound data types (object, array)
230256

231257
### Explanation
232258

259+
- Object key / value
260+
- Array numeric key value
261+
- Array ordered
262+
- Object not ordered
263+
233264
### Example
234-
* `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
235-
* `object`, e.g. `{name: 'John', age: 24}`, or the special object `null`
265+
266+
- `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
267+
- `object`, e.g. `{name: 'John', age: 24}`, or the special object `null`
268+
236269
### Exercise
270+
271+
1. Create a list of your favorite types of food/dishes like this:
272+
273+
```js
274+
['Chocolate', 'Risotto', 'Tuna melt'];
275+
```
276+
277+
2. Create an object that contains the properties of your town/city like this:
278+
279+
```js
280+
{
281+
name: 'Huizen',
282+
province: 'Noord-Holland',
283+
citizens: 50000
284+
}
285+
```
286+
237287
### Essence
238288

239289
_Special thanks to Jim Cramer, Yash Kapila, David Nudge for most of the content_

0 commit comments

Comments
 (0)