✦ Interview Prep
Top 200 Interview
Questions
Topics: HTML, CSS, JS, React, Node.js, MongoDB — curated questions with in-depth answers.
1
Difference between window and document in JavaScript?
2
Difference between callbacks and promises in JavaScript?
3
What are interfaces in TypeScript?
4
What is hoisting in JavaScript?
5
Is JavaScript statically or dynamically typed language? How it is different from other languages?
6
Is JavaScript single-threaded?
7
What is Immediately Invoked Function Expression (IIFE)?
8
What is strict mode in JavaScript?
9
What are higher order functions in JavaScript?
10
Difference between class-based and functional-based components in ReactJS?
11
What is event propagation? How event capturing differs from event bubbling?
12
Explain closures in JavaScript?
13
What is callback in JavaScript?
14
What is memoization?
15
What is DOCTYPE in HTML? Why we use it?
16
What are async and await in JavaScript?
17
Features introduced in JavaScript ES6
18
What is event loop in JavaScript?
19
What is React Query?
20
useMemo hook in React
21
useCallback hook in React
22
What is custom hook in React? How to create it and why we use it?
23
Task: Create a login form in React and send data to backend
24
What are headers in fetch? Explain Content-Type
25
Difference between params and query
26
In which scenarios we use params instead of query?
27
e.preventDefault vs e.stopPropagation
28
Describe a unique feature that I have worked on in my previous company using ReactJS
29
Difference between Context API and Redux with examples
30
Why we use custom hooks instead of normal functions?
31
How to cache data using React Query?
32
What is setImmediate in JavaScript?
33
Difference between microtask vs macrotask queue
34
What are middlewares in NodeJS?
35
How JWT differs from OAuth?
36
What is Zustand?
37
Can we connect two databases in our Node application?
38
Can we use React Query with Redux store?
39
What is dependency injection in React?
40
What is monorepo?
41
What is microfrontend?
42
What are microservices? How to use them with React?
43
What is Webpack? How to bundle files in React?
44
What is bundler in React?
45
How higher order components with props differ from other components?
46
What are hooks in React?
47
Latest versions of React, Node, NPM, MongoDB
48
Coding: Write a code to remove duplicates in string in JavaScript
49
Coding: Write a code in JavaScript to remove duplicates from an array
50
Coding: Write a code to sort an array in JavaScript
51
Coding: Remove and count duplicates in an array in JavaScript
52
How to flatten an array in JavaScript
53
Coding: Convert 1234567 to 1,234,567 in JavaScript
54
Coding: Sum of all the elements of 1234567 in JavaScript
55
Coding: Find factorial of any given number in JavaScript
56
React: What is useRef hook in React? Explain with code
57
React: What is dynamic routing in React?
58
Task: Create a dropdown in React with search feature
59
React: What are higher order components in React? Explain with code example
60
Difference between HTML and HTML5
61
React: Explain lifecycle methods of React
62
React: Do we have lifecycle methods in functional components?
63
React: How to pass data between React components
64
React: How to pass props from parent to child, child to parent, sibling to sibling
65
React: Advantages of React
66
React: Limitations of React
67
What are WebSockets?
68
NodeJS: Why we use app.use in Node.js
69
JavaScript: Difference between map and forEach
70
JavaScript: Map, filter, reduce in JavaScript
71
CSS: SASS vs SCSS vs LESS
72
React: How to do unmounting in functional components in React
73
JavaScript: Explain setImmediate in JavaScript and how it is different from process.nextTick
74
React: What are callback functions in React
75
JavaScript: How to handle asynchronous operations in JavaScript
76
JavaScript: What is callback hell and how to avoid this
77
HTML: How to insert image without using <img> tag in HTML
78
HTML: What are semantic and non-semantic elements in HTML
79
HTML: display:none vs visibility:hidden
80
JavaScript: Find maximum number of 1s in JavaScript array
81
Coding: Find consecutive 1s in JavaScript array
82
Database: Suppose you have millions of records in DB, how would you efficiently fetch and display them
83
CSS: How to make a webpage responsive without using media queries?
84
HTML: Difference between article, section, and div in HTML
85
JavaScript: Give the output of the following code snippet related to hoisting
86
JavaScript: Give output of the snippet related to var variable
87
JavaScript: Give output of the snippet related to setTimeout and Promises
88
JavaScript: Give output of the snippet related to let and var
89
JavaScript: Difference between null and undefined
90
Coding: Find second highest number in an array in JavaScript
91
React: Difference between virtual and real DOM
92
React: What is the structure of virtual DOM?
93
JavaScript: What is optional chaining in JavaScript?
94
React: How to pass data from child to parent in React?
95
React: How do we stop re-rendering of child component when parent is updated?
96
React: How can we use middlewares in ReactJS?
97
JavaScript: Give output of below code related to JavaScript execution context
98
React: Difference between Redux and Redux Toolkit
99
Task: Create TODO app to fetch data from API in React component and display it in tabular format with features including search, pagination, toggle the completed field value if clicked
100
React: Is there any other way to pass data from child to parent apart from callback?
101
React: Knowledge of any testing library to do testing in React
102
React: How do we handle errors in React?
103
JavaScript: What is debouncing?
104
JavaScript: What is throttling?
105
JavaScript: Difference between debouncing and throttling
106
Web: What are Web APIs?
107
JavaScript: Difference between fetch vs axios and why we use axios instead of fetch
108
JavaScript: localStorage vs sessionStorage
109
React: Why we pass key when rendering lists in React?
110
HTML: What are meta tags in HTML?
111
HTML: Which attributes we pass in meta tags in HTML?
112
CSS: What is box model in CSS?
113
What is Flexbox in CSS?
114
Difference between justify-content and align-items in CSS
115
What is Vanilla JavaScript?
116
What are Web Components and How Can We Use Them in React, Angular etc?
117
React: Any Testing Frameworks to Do End-to-End Testing in React
118
React Task: Create 3 Buttons and Highlight Clicked One with Green Color
119
What is Agile Methodology and Which Scrum We Use for Daily Workflow
120
Jira: What is Jira and What is it Used For?
121
Web Components: How to Create Web Components with Examples?
122
What are Web Workers in HTML?
123
What is Web Storage in HTML?
124
Task: Create a Login Form in React.js and Send Values to API
125
Output of setTimeout, Promise & IIFE Function Code
126
What are Service Workers?
127
What is Diffing Algorithm in React?
128
What is Reconciliation in React?
129
What Happens When State or Something Changes in Component?
130
What is Scope in JavaScript? Types of Scopes
131
What is Currying in JavaScript?
132
Difference Between Deep Copy and Shallow Copy in JavaScript
133
What is Module in React?
134
What are Polyfill and Transpiler in React?
135
What is React Fiber?
136
What is Strict Mode in React?
137
What are Controlled and Uncontrolled Components in React?
138
Difference Between useEffect and useLayoutEffect Hooks in React
139
How Do We Handle Large Lists Efficiently in React?
140
Defer vs Async in JavaScript Script Tag
141
What Happens During React's Render and Commit Phases?
142
Explain JavaScript Engine
143
Handling Multiple API Calls Together Before Rendering Content
144
React.memo vs useMemo
145
Difference Between Git Pull vs Git Merge
146
How Do You Deploy Your Code Changes When Working in a Team?
147
What are Pure Functions?
148
Difference Between useMemo and useCallback Hooks
149
How Do You Calculate Page Load Time in React?
150
Drawbacks of ContextAPI Over Redux
151
Var vs Let in JavaScript
152
What is Throttling and How It Works?
153
Functional vs Class Components in React & Why Prefer Functional
154
What is useEffect Hook in React?
155
What is Virtual DOM in React?
156
What are Hooks in React?
157
What is useContext Hook in React?
158
What is useMemo Hook in React?
159
What are Pure Components in React?
160
What are Higher Order Components in React?
161
How Do We Manage States in React?
162
What is Prop Drilling in React?
163
Difference Between Local and Session Storage
164
What is var in JavaScript?
165
Var vs Let vs Const in JavaScript
166
Why We Prefer Node.js Over Other Backend Frameworks?
167
React Component with Name & Age Form Example
168
What is preventDefault() in JavaScript?
169
How to Do Unit Testing of Components Using Jest?
170
Different Types of End-to-End Testing Libraries
171
What is Redux Thunk?
172
Redux vs Redux Toolkit
173
JavaScript Code — Add 1 to the Array (Ex: [1, 2, 3] → [1, 2, 4])
174
Task - Create a login screen which takes userID and password, and invokes login API
175
Why we use HTML semantic elements?
176
Difference between PUT vs PATCH while calling API?
177
React - How to detect that data needs to be fetched while loading icon is showing on screen in lazy-loading?