You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+124-36
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,22 @@
9
9
```js
10
10
let languages ="java javaScript python cSharp";
11
11
let result =languages.lastIndexOf("S");
12
-
console.log(result)
12
+
console.log(result)
13
13
```
14
14
**Question 4:** Guess the **Output** and Explain Why?
15
15
16
16
```js
17
17
let variable ="hello programmers";
18
18
let result =Number(variable);
19
-
console.log(result);
19
+
console.log(result);
20
20
```
21
21
**Question 5:** Guess the **Output** and Explain Why?
22
22
```js
23
23
let num1 =32;
24
24
let num2 ="32";
25
25
let result1 = num1 !== num2;
26
26
let result2 = num1 != num2;
27
-
console.log(result1,result2);
27
+
console.log(result1,result2);
28
28
```
29
29
30
30
**Question 6:** Guess the **Output** and explain Why?
@@ -39,22 +39,22 @@ console.log(result);
39
39
let num1 =2;
40
40
let num2 =5;
41
41
let result = num1**num2*2;
42
-
console.log(result);
42
+
console.log(result);
43
43
```
44
44
**Question 8:** Guess the **Output** and Explain Why?
45
45
```js
46
46
let num1 = [1,2,4,5];
47
47
let num2 = [6,5,8,0];
48
48
let result =num1.concat(num2);
49
-
console.log(result)
49
+
console.log(result)
50
50
```
51
51
**Question 9:** Guess the **Output** and Explain Why?
52
52
```js
53
53
let a =5;
54
54
let b =7;
55
55
let c =8;
56
56
let result = a<b>c;
57
-
console.log(result)
57
+
console.log(result)
58
58
```
59
59
**Question 10:** If your state split into **four** equal parts such that in each part there are **1/4** number of people live. You have to find How many people would live in each part?
60
60
@@ -80,7 +80,7 @@ else{
80
80
```js
81
81
let i =0;
82
82
for(i;i<5;i++){
83
-
console.log(i);
83
+
console.log(i);
84
84
}
85
85
```
86
86
**Question 3:** Write a simple **Program** in which You have to print first **10** number in **descending** order?
@@ -122,7 +122,7 @@ Example
122
122
functionaddition(num1,num2){
123
123
return num1 + num2;
124
124
}
125
-
console.log(addition()); //You are not allowed to modify this line any more
125
+
console.log(addition()); //You are not allowed to modify this line any more
126
126
```
127
127
128
128
**Question 4:** Identify which **type** of value passed below into the function **greet()**
**Question 7:** Create a new class **Animal** (which will be child class) inherited from **Person** class. In Addition in **Animal** class Add some additional properties like **breedType** and **animalFamily**.(catFamily, dogFamily)
@@ -489,10 +492,88 @@ class Car {
489
492
}
490
493
}
491
494
let car =newCar();
492
-
console.log(Car.prototype.isPrototypeOf(Car));
493
-
console.log(Car.prototype.isPrototypeOf(car));
495
+
console.log(Car.prototype.isPrototypeOf(Car));
496
+
console.log(Car.prototype.isPrototypeOf(car));
497
+
```
498
+
## Chapter 11( Async & Await )
499
+
500
+
### Assignments
501
+
502
+
**Question 1:** Guess the **Output** And Explain Why?
**Question 2:** Guess the **Output** And Explain Why?
@@ -521,7 +602,7 @@ weight:70
521
602
}
522
603
523
604
let {name:objName,age} = obj;
524
-
console.log(name,age);
605
+
console.log(name,age);
525
606
```
526
607
527
608
**Question 4:** You have given an array of **nums**.Create**shallow** copy of that array and store them in another **variable**
@@ -549,7 +630,7 @@ console.log(result);
549
630
**Question 7:** You have given an object as below. You have to check wheather **physics** is the subject of that student or not, if true find the **score** of **physics** subject using **optional chaining**
550
631
551
632
```js
552
-
let student = {
633
+
let student = {
553
634
Math:{
554
635
score:75,
555
636
},
@@ -563,12 +644,19 @@ score:85,
563
644
```js
564
645
let nums = [2,3,4,5,6];
565
646
for(let key of nums) {
566
-
console.log(key)
647
+
console.log(key)
567
648
}
568
649
```
569
650
570
-
651
+
## Chapter 13 (Modern Tooling)
571
652
653
+
### Assignments
654
+
655
+
**Question 1:** You have given scenario. You are in **script.js** And in same directory there is another file **products.js**. In **products.js** there are two methods called **createProduct** and **deleteProduct**
656
+
657
+
write an **import** and **export** statement properly in order to import these two methods from **products.js** file into the **script.js**
572
658
573
659
660
+
**Question 2** Now **export** only one method **createProduct** using **default** export statement?
574
661
662
+
**Question 3:** In **importing** statement how can we **customize**/**change** the name of **function** we are importing?
0 commit comments