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

Skip to content

Commit 5642e27

Browse files
authored
Update LESSONPLAN.md
1 parent fb8e605 commit 5642e27

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

Week3/LESSONPLAN.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@ function myFunction() {
8080

8181
myFunction();
8282
```
83+
Made by Yash: https://github.com/yash-kapila/HYF-JS2-Week3/blob/master/src/scope.js
8384
### Essence
8485
Same link as Explanation
8586

8687
## 3. What hoisting is and the difference between compile time and run time
8788
### Explanation
8889
### Example
8990
### Exercise
91+
Made by Yash: https://github.com/yash-kapila/HYF-JS2-Week3/blob/master/src/hoisting.js
9092
### Essence
9193
Notes:
9294

@@ -98,13 +100,29 @@ SECOND HALF (14.00 - 16.00)
98100

99101
## 4. The use and purpose of closures
100102
### Explanation
103+
101104
### Example
102-
### Exercise
103-
### Essence
104-
Notes:
105105

106-
- Used for data privacy
107-
- Access to the environment of the outer function
106+
Credits to Yash:
107+
``` Javascript
108+
{
109+
'use strict';
110+
111+
const printName = () => {
112+
const message = 'My name is ';
108113

114+
const displayName = name => {
115+
console.log(`${message}${name}`);
116+
}
117+
118+
return displayName;
119+
};
120+
121+
const name = printName();
122+
name('Yash Kapila');
123+
}
124+
```
125+
### Exercise
126+
### Essence
109127

110128

0 commit comments

Comments
 (0)