Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fa736f

Browse files
Update README.md
1 parent01693d1 commit8fa736f

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

‎README.md‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ He want to live in a country that speaks **English**, has less than 10 million p
8888
**Question 6:** use**nested-if** statement to check your**age>18**
8989
than check your height**height > 5.10**.
9090
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**
9193

9294
##Chapter 3 (Function)
9395

@@ -113,6 +115,20 @@ console.log(`Welcome ${person.name}`)
113115
}
114116
greet(person)
115117
```
118+
**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?
127+
```js
128+
letarrowFunction= (name="Coders")=> {`Welcome${name}`};
129+
130+
console.log(arrowFunction("Programmers"));
131+
```
116132

117133
##Chapter 4 (Objects)
118134

@@ -148,6 +164,25 @@ console.log(car.carColor);
148164

149165
**Question 7:** Generate random numbers between 0 and 10 using**trunc** method of**MATH** object
150166

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 elemin arr){
183+
console.log(elem);
184+
}
185+
```
151186

152187

153188
##Chapter 5 (DOM)
@@ -167,9 +202,68 @@ console.log(car.carColor);
167202
2) contain at least one special character
168203
3) contain at least one alphabet (a-z) character
169204

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?
170222

223+
**Question 5:** One**key** difference between**map** and**filter** method of array?
171224

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%
172226

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?
264+
265+
266+
173267

174268

175269

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp