|
1 | 1 | # Lesson plan |
2 | 2 |
|
3 | 3 | - Focus on having lots of in class exercises. |
4 | | -- DONT teach everything, let the students investigate topics on their own aswell! |
| 4 | +- DON'T teach everything, let the students investigate topics on their own as well! |
5 | 5 | - Focus on how to read documentation, google answers and google errors!! |
6 | 6 | - Teach towards the students being able to solve the homework |
7 | 7 |
|
8 | | -Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you dont have access, write to one from the core team. You can see an example below! |
| 8 | +Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below! |
9 | 9 |
|
10 | 10 | To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork) |
11 | 11 |
|
@@ -118,7 +118,7 @@ function checkItem() { |
118 | 118 | } |
119 | 119 |
|
120 | 120 | // use the function by calling it using () |
121 | | -// If we dont call the function that code will NEVER EVER IN A MILLION YEARS run! |
| 121 | +// If we don't call the function that code will NEVER EVER IN A MILLION YEARS run! |
122 | 122 | checkItem(); |
123 | 123 | console.log(todoItem); |
124 | 124 |
|
@@ -148,7 +148,7 @@ function sum(a, b) { |
148 | 148 | const returnedSum = sum(5, 10); // the variable returnedSum captures the return value from calling the function! |
149 | 149 | console.log(returnedSum); // logs 15 |
150 | 150 |
|
151 | | -// If we dont return, we cannot capture the returned value! |
| 151 | +// If we don't return, we cannot capture the returned value! |
152 | 152 | function sumNoReturn(a, b) { |
153 | 153 | a + b; // no return! |
154 | 154 | } |
@@ -256,9 +256,9 @@ const balance = 1000; |
256 | 256 |
|
257 | 257 | ### Function |
258 | 258 |
|
259 | | -Create a function called `getCircleArea`. It should have the `radius` of the circle as parameter and return the circle area. What happens if we dont return anything in the function? |
| 259 | +Create a function called `getCircleArea`. It should have the `radius` of the circle as parameter and return the circle area. What happens if we don't return anything in the function? |
260 | 260 |
|
261 | | -Create a function called `celciusToFahreneit` it should have a parameter called `celcius`. It should return the temperature in fahrenheit. |
| 261 | +Create a function called `celsiusToFahrenheit` it should have a parameter called `celsius`. It should return the temperature in fahrenheit. |
262 | 262 |
|
263 | 263 | Try call the function and check with google if the function returns the right value. |
264 | 264 |
|
@@ -307,16 +307,16 @@ logString("hello", 3); |
307 | 307 |
|
308 | 308 | ### Send emails |
309 | 309 |
|
310 | | -Imagine we work at a company. Peter from the HR department wants us to send out a couple of emails to some recepients. The only problem is that he sent us the email in a weird format: `[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]` |
| 310 | +Imagine we work at a company. Peter from the HR department wants us to send out a couple of emails to some recipients. The only problem is that he sent us the email in a weird format: `[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]` |
311 | 311 |
|
312 | | -Use the `sendEmailTo` function to send an email to all the recepients that we got from Peter. |
| 312 | +Use the `sendEmailTo` function to send an email to all the recipients that we got from Peter. |
313 | 313 |
|
314 | 314 | _Hint_ use the `.split` method and look up `iterating an array js for loop` on google. |
315 | 315 |
|
316 | 316 | ```js |
317 | | -// This function emulates sending emails to receipients |
318 | | -function sendEmailTo(recepient) { |
| 317 | +// This function emulates sending emails to recipients |
| 318 | +function sendEmailTo(recipient) { |
319 | 319 | // But really it only logs out a string |
320 | | - console.log("email sent to " + recepient); |
| 320 | + console.log("email sent to " + recipient); |
321 | 321 | } |
322 | 322 | ``` |
0 commit comments