Skip to content

Commit c029a45

Browse files
committed
add assignment
1 parent 0bf8a18 commit c029a45

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
============
2+
Assignment-1
3+
============
4+
5+
create a function calculator with two function arguments, and having four nested functions
6+
called addition, subtraction, multiplication and division, which will return the result
7+
(and wont log the result to console).
8+
9+
The calculator function should return these function as object
10+
11+
using this returned object console log the result of each operation
12+
13+
and write an object explaining execution context of every function and global execution context
14+
15+
---
16+
17+
============
18+
Assignment-2
19+
============
20+
21+
Write the function to calculate the area of a circle.
22+
Use regular as well as arrow notation
23+
Assign this function to variable and use that variable to call this function
24+
25+
---
26+
27+
=============
28+
Assignment-3
29+
=============
30+
31+
explain why console.log(temp) produces error in outerFunction but not in the innerFunction
32+
33+
also write scope chain for every function
34+
35+
```javascript
36+
const outerFunction = () => {
37+
var outerVar1 = 'javascript';
38+
console.log(temp);
39+
40+
function innerFunction() {
41+
var temp = 345;
42+
console.log(temp);
43+
}
44+
45+
innerFunction();
46+
};
47+
48+
outerFunction();
49+
```

0 commit comments

Comments
 (0)