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

Skip to content

Commit 5f89a8b

Browse files
committed
improve lessonplan week1
1 parent 6040b1a commit 5f89a8b

File tree

1 file changed

+61
-53
lines changed

1 file changed

+61
-53
lines changed

Week1/LESSONPLAN.md

Lines changed: 61 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The purpose of this class is to introduce to the student:
66

77
- The 2 types of websites: static vs. dynamic
88
- The pillars of web development: HTML/CSS/JavaScript
9+
- where JavaScript can run: Browser / Node
910
- What are variables
1011
- How to name variables properly
1112
- What are the basic data types
@@ -34,27 +35,43 @@ Examples the two different kind of websites
3435
Discuss in class which claim belongs to which type of website:
3536

3637
Content of Web pages can not be change at runtime.
38+
39+
3740
Server side languages such as PHP, Node.js are used.
41+
42+
3843
Content of Web pages can be changed.
39-
No interation with database possible.
40-
Interaction with database is possible
41-
It is faster to load as compared to the other typ of website.
44+
45+
46+
No interaction with database possible.
47+
48+
49+
Interaction with database is
50+
51+
52+
It is faster to load as compared to the other type of website.
53+
54+
4255
It is slower then static website.
56+
57+
58+
4359
Lower Development costs.
60+
61+
62+
4463
Content may change everytime the page is loaded.
64+
65+
4566
Feature of Content Management System.
46-
HTML, CSS, Javascript is used for developing the website.
47-
Same content is delivered everytime the page is loaded.
4867

49-
<<<<<<< HEAD
5068

51-
### Essence
69+
HTML, CSS, Javascript is used for developing the website.
5270

53-
=======
5471

55-
##### Essence
72+
Same content is delivered everytime the page is loaded.
5673

57-
> > > > > > > add exercises to part 2
74+
### Essence
5875

5976
[In the link is an article with (dis)advantages of both static and dynamic websites.](https://www.spiderwriting.co.uk/static-dynamic.php)
6077

@@ -81,13 +98,17 @@ Discuss in class which claim belongs to which type of website:
8198
- HTML defines what the content is.
8299
- CSS defines the appearance of the page.
83100
- JavaScript defines behavior of the page.
101+
- Where can JavaScript run:
102+
- browser
103+
- Node
84104

85105
### Example
86106

87107
- An example about relationship between HTML, CSS and Javascript using a metaphor of building a city: https://blog.codeanalogies.com/2018/05/09/the-relationship-between-html-css-and-javascript-explained/
88108

89109
### Exercise
90110

111+
Let students fork and then clone the repository.
91112
Let students create a classwork directory and create an index.html along with an app.js. Script tag should be added to the end of body tag(reason for doing so is part of JS2 Week1).
92113

93114
The end result should look like:
@@ -106,7 +127,7 @@ These static pages can interact with a visitor only through the use of forms. On
106127

107128
A big disadvantage of web pages like this is that the only way that a visitor has of interacting with the page is by filling out the form and waiting for a new page to load.
108129

109-
It doesn't exhibit any dynamic behaviour like:
130+
It doesn't exhibit any dynamic behavior like:
110131

111132
1. reacting to user actions such as mouse click events or key presses.
112133
1. rendering complex animations
@@ -116,12 +137,6 @@ It doesn't exhibit any dynamic behaviour like:
116137

117138
## 3. What are variables (const & let) & naming conventions
118139

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

127142
In JavaScript, there are three ways of creating variables.
@@ -158,8 +173,8 @@ console.log(age);
158173

159174
```javascript
160175
// Variable Initialization
161-
var firstName = 'Yash';
162-
let lastName = 'Kapila';
176+
var firstName = 'Marco';
177+
let lastName = 'Borsato';
163178
const age = 29;
164179

165180
console.log(firstName);
@@ -174,9 +189,9 @@ let lastName = 'Hanks';
174189
console.log(firstName);
175190
console.log(lastName);
176191

177-
// Assigning variables to a different value
178-
firstName = 'Hanks';
179-
lastName = 'Tom';
192+
// Assigning a different value to variables
193+
firstName = 'Katy';
194+
lastName = 'Perry';
180195

181196
console.log(firstName);
182197
console.log(lastName);
@@ -191,7 +206,7 @@ console.log(lastName);
191206

192207
1. Make 2 variables using the `const` keyword
193208
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
209+
1. come up with name and a value for the second variable yourself
195210

196211
### Essence
197212

@@ -207,83 +222,76 @@ _SECOND HALF (14.00 - 16.00)_
207222

208223
### Explanation
209224

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.
214-
(https://javascript.info/types)
225+
In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods. There are 7 primitive data types: `string`, `number`, `bigint`, `boolean`, `null`, `undefined`, and `symbol`.
215226

216227
Boolean — true or false
217228
Null — no value
218229
Undefined — a declared variable but hasn’t been given a value
219230
Number — integers, floats, etc
220231
String — an array of characters i.e words
221-
?? Symbol — a unique value that's not equal to any other value ??
232+
Symbol — a unique value that's not equal to any other value (not used during HYF)
222233

223234
### Example
224235

225236
- `string`, e.g. "HackYourFuture"
226237
- `number`, e.g. 5, or 10.6
227238
- `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".
239+
- `array`, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
240+
- `null` \*
241+
- `undefined` \*
242+
- `symbol` e.g. `new Symbol('example')`
232243

244+
\* 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".
233245
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.
234246

235-
- `symbol`
236-
237-
```js
238-
let x = 5;
239-
let typeOfX = typeof x; // -> "number"
240-
```
241-
242247
### Exercise
243248

244-
Everybody has two minutes to find a way to declare all basic data types by making use of the typeof operator:
249+
Everybody has four minutes to find a way to store all basic data types in a variable by making use of the typeof operator:
245250

246251
```js
247252
let x = 5;
248253
let typeOfX = typeof x; // -> "number"
249254
```
250255

251-
##### Essence
256+
### Essence
252257

253258
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/
254259

255260
## 5. The compound data types (object, array)
256261

257262
### Explanation
258263

259-
- Object key / value
260-
- Array numeric key value
261-
- Array ordered
262-
- Object not ordered
264+
Pieces of information often form a group. For example the names of all the students in this class can be grouped together
265+
as a list. In JavaScript lists are stored in a datatype called an `Array`.
266+
267+
Another way pieces of information can form a group are multiple properties of the same thing. For example the dimensions
268+
of this room: length, width, height. These groups of information are stored in a datatype called an `Object`.
263269

264270
### Example
265271

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`
272+
- `array`\*, e.g. `[1, 2, 3]` or `['Gijs', 'Jim', 'Noer', 'Wouter']`
273+
- `object`, e.g. `{name: 'Wilgert', shoeSize: 42}`, or the special object `null`
268274

269275
### Exercise
270276

271277
1. Create a list of your favorite types of food/dishes like this:
272278

273279
```js
274-
['Chocolate', 'Risotto', 'Tuna melt'];
280+
const foods = ['Chocolate', 'Risotto', 'Tuna melt'];
275281
```
276282

277283
2. Create an object that contains the properties of your town/city like this:
278284

279285
```js
280-
{
286+
const city = {
281287
name: 'Huizen',
282288
province: 'Noord-Holland',
283-
citizens: 50000
284-
}
289+
population: 50000,
290+
capital: false,
291+
};
285292
```
286293

287294
### Essence
288295

289-
_Special thanks to Jim Cramer, Yash Kapila, David Nudge for most of the content_
296+
- Object key: value
297+
- Array numeric index: value

0 commit comments

Comments
 (0)