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
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ a = "Hello";
49
49
console.log(a); // "Hello";
50
50
```
51
51
##
52
-
[Back to Top](#javascript-basics)
52
+
[Back to Top](#javascript-most-asked-interview-questions)
53
53
54
54
### Q2. What are the different datatypes in JavaScript? (Most asked)
55
55
@@ -67,7 +67,7 @@ console.log(a); // "Hello";
67
67
- Object
68
68
- Date
69
69
##
70
-
[Back to Top](#javascript-basics)
70
+
[Back to Top](#javascript-most-asked-interview-questions)
71
71
72
72
### Q3. What is Hoisting in JavaScript? (Most asked)
73
73
- In other scripting/server side languages, variables or functions must be declared before using it.
@@ -81,7 +81,7 @@ console.log(a); // "Hello";
81
81
- let and const - Hoisted but not initialized. (Temporal dead zone).
82
82
- class declarations - Hoisted but not initialized.
83
83
##
84
-
[Back to Top](#javascript-basics)
84
+
[Back to Top](#javascript-most-asked-interview-questions)
85
85
86
86
### Q4. What is temporal dead zone ?
87
87
- It is a specific time period in the execution of javascript code where the variables declared with let and const exists but cannot be accessed until the value is assigned.
@@ -95,7 +95,7 @@ function somemethod() {
95
95
}
96
96
```
97
97
##
98
-
[Back to Top](#javascript-basics)
98
+
[Back to Top](#javascript-most-asked-interview-questions)
99
99
100
100
### Q5. What are the differences let, var and const ? (Most asked)
101
101
@@ -112,7 +112,7 @@ function somemethod() {
112
112
-`let` and `const` are hoisted to the top of the block scope but do not get assigned any value (temporal dead zone).
113
113
114
114
##
115
-
[Back to Top](#javascript-basics)
115
+
[Back to Top](#javascript-most-asked-interview-questions)
116
116
117
117
### Q6. List out some key features of ES6. (Most asked)
118
118
@@ -129,7 +129,7 @@ function somemethod() {
129
129
130
130
👉 **Interview Tip:** Explain these features with these simple definitions to make good use of 2-3 minutes of interview time.
131
131
##
132
-
[Back to Top](#javascript-basics)
132
+
[Back to Top](#javascript-most-asked-interview-questions)
133
133
134
134
### Q7. What are limitations of arrow functions in javascript ?
135
135
- Arrow functions are introduced in ES6. They are simple and shorter way to write functions in javascript.
@@ -140,7 +140,7 @@ function somemethod() {
140
140
- Arrow functions cannot be used as generator functions.
141
141
- 👉 **Note:** Arrow functions + this combination questions will be asked here. Please explore on this combinations.
142
142
##
143
-
[Back to Top](#javascript-basics)
143
+
[Back to Top](#javascript-most-asked-interview-questions)
144
144
145
145
### Q8. What’s the spread operator in javascript ?
146
146
Spread operator is used to spread or expand the elements of an iterable like array or string into individual elements.
@@ -165,7 +165,7 @@ let a = […x] // 1,2
165
165
```
166
166
-**👉 Interview Tip**: Practice the above examples mentioned and showcase them in interviews to make interviewer think that you are a practical person. 😉
167
167
##
168
-
[Back to Top](#javascript-basics)
168
+
[Back to Top](#javascript-most-asked-interview-questions)
169
169
170
170
### Q9. What is rest operator in javascript ?
171
171
- Rest operator is used to condense multiple elements into single array or object.
@@ -177,7 +177,7 @@ let a = […x] // 1,2
177
177
Example(1,2,3,4);
178
178
```
179
179
##
180
-
[Back to Top](#javascript-basics)
180
+
[Back to Top](#javascript-most-asked-interview-questions)
181
181
182
182
- It is introduced in Es6.
183
183
- It allows us to assign the object properties and array values to distinct variables.
@@ -195,7 +195,7 @@ const [a,b] = [1,2];
195
195
console.log(a,b) // 1,2
196
196
```
197
197
##
198
-
[Back to Top](#javascript-basics)
198
+
[Back to Top](#javascript-most-asked-interview-questions)
199
199
200
200
### Q10. What are the differences between Map and Set ?
201
201
@@ -243,7 +243,7 @@ let data = new Set();
243
243
Sushant
244
244
```
245
245
##
246
-
[Back to Top](#javascript-basics)
246
+
[Back to Top](#javascript-most-asked-interview-questions)
247
247
### Q11. What are modules in javascript ?
248
248
- Modules allows us to break down the large piece of code into smaller parts.
249
249
- Modules helps us to write more reusable and maintenable code.
@@ -280,14 +280,14 @@ In Pass by reference, parameters passed as an arguments does not creates their o
280
280
console.log(arr); // Output: [1, 2, 3, 4]
281
281
```
282
282
##
283
-
[Back to Top](#javascript-basics)
283
+
[Back to Top](#javascript-most-asked-interview-questions)
284
284
285
285
### Q13. What is the difference between map and filter ? (Frequently asked)
286
286
- Both map and filter are useful in JavaScript when working with an arrays.
287
287
- map transforms each element of an array and creates a new array which contains the transformed elements. whereas filter will creates a new array with only those elements which satisfies the specified condition.
288
288
289
289
##
290
-
[Back to Top](#javascript-basics)
290
+
[Back to Top](#javascript-most-asked-interview-questions)
291
291
292
292
### Q14. What is the difference between map() and forEach() (Frequently asked)
293
293
- map method is used to transform the elements of an array. Whereas forEach method is used to loop through the elements of an array.
@@ -312,7 +312,7 @@ numbers.forEach((number) => {
312
312
```
313
313
314
314
##
315
-
[Back to Top](#javascript-basics)
315
+
[Back to Top](#javascript-most-asked-interview-questions)
316
316
317
317
### Q15. What is the difference between for-in and for-of ?
318
318
Both for-in and for-of are used to iterate over the datastructure.
@@ -353,7 +353,7 @@ for (let fruit of fruits) {
353
353
```
354
354
355
355
##
356
-
[Back to Top](#javascript-basics)
356
+
[Back to Top](#javascript-most-asked-interview-questions)
357
357
358
358
### Q16. What is difference between find vs findIndex ?
359
359
**find:**
@@ -385,7 +385,7 @@ for (let fruit of fruits) {
385
385
2
386
386
```
387
387
##
388
-
[Back to Top](#javascript-basics)
388
+
[Back to Top](#javascript-most-asked-interview-questions)
389
389
390
390
### Q17. What is the difference between Pure and Impure functions?
0 commit comments