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
+94
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,8 @@ He want to live in a country that speaks **English**, has less than 10 million p
88
88
**Question 6:** use **nested-if** statement to check your **age>18**
89
89
than check your height **height > 5.10**.
90
90
If **both** true show any message(**I can sit in __ exam**) in the console?
91
+
92
+
**Question 7:** Create two variables **grade** and **passingYear**.Check if your **grade == "A"** and **passingYear < 2020** with the help of **ternary** operator(Not allowed to use any logical operator).If both condition *true* print on console **Qualify**. Otherwise **Fail**
**Question 5:** Explain use of **return** statement inside the function?
119
+
120
+
**Question 6:** What are **higher** order functions in JavaScript?
121
+
122
+
**Question 7:** Create **higher** order function named as **transformer** which take **string** and **firstUpperCaseWord()** as an arguments. And return **string** with first word in **upperCase**
123
+
124
+
**Question 8:** Difference between **setTimeOut** and **setInterval** function. Also write **syntax** of both methods with specifying what are **required** and **optional** arguments in both function
125
+
126
+
**Question 9:** Guess the **Output** And Explain Why?
**Question 7:** Generate random numbers between 0 and 10 using **trunc** method of **MATH** object
150
166
167
+
**Question 8:** Guess the **Output** and Explain Why?
168
+
```js
169
+
let arr = [1,2,3,4];
170
+
arr.forEach(elem=>{
171
+
if(elem ==1){
172
+
continue;
173
+
}
174
+
console.log(elem);
175
+
})
176
+
```
177
+
**Question 9:** Difference between **call** and **apply** method in term of implementation?
178
+
179
+
**Question 10:** Guess the **Output** And Explain Why?
180
+
```js
181
+
let arr = [1,2,3,4];
182
+
for(let elem in arr){
183
+
console.log(elem);
184
+
}
185
+
```
151
186
152
187
153
188
## Chapter 5 (DOM)
@@ -167,9 +202,68 @@ console.log(car.carColor);
167
202
2) contain at least one special character
168
203
3) contain at least one alphabet (a-z) character
169
204
205
+
## Chapter 7(Array Methods)
206
+
207
+
### Assignments
208
+
209
+
**Question 1:** Difference between **slice** and **splice** method of array?
210
+
211
+
**Question 2:** You have given an array of **5** elements(1-5). Your task is defined as below.
212
+
213
+
1) You have to delete **2** elements starting from index **2**.
214
+
2) You have to add **3** new elements on that position of Your choice.
215
+
3) Display the **2 deleted** elements in console.
216
+
217
+
218
+
**Question 3:** What happens if we use **negative** number inside **slice** method?
219
+
Example : arr.slice(-2);
220
+
221
+
**Question 4:** Write **three** different methods/approaches to get **last** element of the array?
170
222
223
+
**Question 5:** One **key** difference between **map** and **filter** method of array?
171
224
225
+
**Question 6** You have given an array of **scores** in which score of each student stored. Create a new array with the help of original **scores** array in which only those scores exist **greater** than 75%
172
226
227
+
```js
228
+
let totalScore =150;
229
+
let scores = [55,76,35,77,88,97,120,136,140];
230
+
```
231
+
**Question 7:** You have given an array of numbers **nums**. You have to find **sum** of all array elements using **reduce** method?
232
+
233
+
```js
234
+
let nums = [2,3,5,7,8,4,9];
235
+
```
236
+
**Question 8:** You have given an array of numbers **nums**. You have to find the index of value **8** using **built-in** method of array?
237
+
```js
238
+
let nums = [2,3,5,6,8,6,4,8];
239
+
```
240
+
**Question 9:** Explain working difference between **find** and **findIndex** method?
241
+
242
+
**Question 10:** Difference between **flat** and **flatMap** with details. Also Explain when to use which method?
243
+
244
+
**Question 11:** By default how **sort** method sort the array.
245
+
246
+
**Question 12:** Guess the **Output** and Explain Why?
247
+
```js
248
+
let arr = [1,2,3,4];
249
+
let result =arr.splice(1,2).pop();
250
+
console.log(result);
251
+
```
252
+
**Question 13:** You have given an array of numbers **nums**. You have to check if all elements of the **array > 15** using **built-in** array method.
253
+
```js
254
+
let nums = [16,17,18,28,22];
255
+
```
256
+
257
+
## Chapter 8 (Date and Time)
258
+
259
+
### Assignments
260
+
261
+
**Question 1:** How can we get current time in **millisecond**?
262
+
263
+
**Question 2:** Explain difference between **getDate()** and **getDay()** method of current Date?
0 commit comments