-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterviewExtraQuestionsFromSenior
More file actions
131 lines (98 loc) · 5.23 KB
/
InterviewExtraQuestionsFromSenior
File metadata and controls
131 lines (98 loc) · 5.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
1. What are Preload, Reconnect, Prefetch, and Prerender?
2. How can you do caching on a website?
3. What are ETag, Cache-Control, and Document Fragment?
4. How do you optimize assets? What is image compression? What’s the difference between WebP, PNG, and JPG?
5. What is a Memory Leak?
6. What’s the difference between Repaint and Reflow (often confused with Rework)?
7. If a user clicks a button multiple times to fetch data, how to cancel old API calls and use only the latest result?
8. Does React use Promise.allSettled() for parallel API calls? How does that work internally?
9. What algorithm does Array.prototype.sort() use? What’s the output of [1, null, 5, 2, undefined]?
10. What happens when we hit a URL in the browser? What is CRP (Critical Rendering Path)?
11. What events can we use when a website is loading? In-depth view of CRP (Critical Rendering Path)
12. Difference between Prototypal and Classical Inheritance in JavaScript
13. How does JavaScript handle asynchronous operations? What mechanisms does it use?
14. What are the SOLID Principles?
15. How do we use OOP in JavaScript?
16. What are Semantic HTML Elements?
17. What is srcset in HTML?
18. Difference between display: none and visibility: hidden
19. Basic performance-related common questions.
20. What is the use of the new operator in JavaScript?
21. Explain the webpack build process?
22. How would you architect an application to support multiple devices?
23. What is the use of Headers in HTTP requests?
24. What are render-blocking resources?
25. Event Capturing vs Delegation vs Bubbling
26. Can we bind this in an arrow function? What happens if we use the new operator with an arrow function?
27. Difference between map and object in JavaScript
28. What are Closure, Event Loop, Hoisting, and Currying?
29. What are Web Core Vitals? How to improve them?
30. Explain Web Performance Metrics
Bonus Questions:
1. What are Symbols and Generators?
2. What are Web Components, Service Worker, Web Worker, and Progressive Web App (PWA)?
𝗕𝗮𝘀𝗶𝗰 𝗟𝗲𝘃𝗲𝗹 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀:
1. What is React and how does it work?
2. What are the differences between functional and class components?
3. What are props and state? How are they different?
4. What is JSX, and why is it used in React?
5. How do you create a simple React component?
6. What is the Virtual DOM, and why is it important?
7. What is the purpose of the key prop in React lists?
8. How do you handle events in React?
9. What are default props in React?
10. What is conditional rendering in React?
𝗠𝗼𝗱𝗲𝗿𝗮𝘁𝗲 𝗟𝗲𝘃𝗲𝗹 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀:
11. What are React Hooks? Can you explain useState and useEffect with examples?
12. What is the difference between controlled and uncontrolled components?
13. What is React Router, and how does client-side routing work?
14. What is the Context API, and when should you use it instead of Redux?
15. What is prop drilling, and how can it be avoided?
16. What is React.memo, and how does it help with performance optimization?
17. What is the difference between useMemo and useCallback?
18. What is a Higher-Order Component (HOC), and how is it used?
19. How does React handle forms, and what are controlled inputs?
𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗟𝗲𝘃𝗲𝗹 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀:
20. How does React handle re-renders, and how can you optimize unnecessary renders?
21. What is reconciliation in React?
22. How does React’s diffing algorithm work?
23. What is React.lazy and Suspense? How does lazy loading work in React?
24. What are error boundaries, and how do they work?
25. How do you handle authentication and protected routes in React?
26. What are render props, and how are they different from HOCs?
27. How does server-side rendering (SSR) differ from client-side rendering (CSR) in React?
28. What are React Fiber and Concurrent Mode?
29. How do you test React components? What are the commonly used testing libraries?
Knowledge
“What happens when you enter a URL and press Enter?”
Here’s the answer that got me selected later 👇
1. Browser checks cache
→ If resources are already cached, it may skip network calls
2. DNS lookup
→ Domain is converted into an IP address
3. TCP connection
→ Browser establishes connection with the server (3-way handshake)
4. SSL/TLS handshake (HTTPS)
→ Secure connection is established (encryption keys exchanged)
5. HTTP request sent
→ Browser sends request (headers, cookies, method like GET)
6. Server processes request
→ Backend handles logic, fetches data, prepares response
7. HTTP response received
→ HTML, CSS, JS files come back with status code
8. Browser parses HTML
→ Builds DOM (Document Object Model)
9. CSS is parsed
→ Builds CSSOM (CSS Object Model)
10. JS execution begins
→ Can block rendering if synchronous
11. DOM + CSSOM → Render Tree
→ Combines structure + styles
12. Layout (Reflow)
→ Calculates exact position and size of elements
13. Paint
→ Pixels are drawn on screen
14. Compositing
→ Layers are combined and GPU may optimize rendering
15. Page becomes interactive
→ Event listeners attached, hydration (in modern frameworks)