Interview Questions and Tips To Answer DpG6N4B7

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Interview Questions and Tips to Answer.

In the last 35 days, I have applied for Jobs in 15 different companies. Invited for interviews with 8,
walked out from 3 companies in the middle. Given almost 20 rounds of interviews, cleared EVERY
SINGLE ROUND.

Now, I have 4 offers in hand,1 Full Stack, and 3 Frontend roles. 1 pending.

I’m writing this document to share all the questions I faced in the interviews and some tips to
answer them.

You might feel questions are repeated after reading the first few sections but I highly recommend you go
through the whole document cause there is always ( at least ) a couple of unique questions in every
interview.

Company -1
Role - JavaScript UI Engineer, 1+ years of experience.
I applied to this role via Naukri.com after verifying the job exists on their careers page. The whole
interview process had 5 rounds in total, 4 tech rounds, and one HR. Let’s look at each round of the
interview.
1. Online Assessment - I got an online assessment link to be taken in the next 3 days. You can
check the problem statement with the solution in the Github repo here. ( Give it a star my friend
☺️).
2. Tech Interview with a Senior Engineer.

The 2nd round was a face-to-face ( virtual ) interview. In this round, the interviewer introduced himself
and asked about myself. After this, the actual interview started.
• At first, the interviewer opened my solution for the online assessment and started asking about
that. I had implemented mouseenter and mouseleave events to change the color of only
vowels on hovering over the reversed text (Read the problem statement in the index.js file of the
GitHub repo linked above ).
• He asked me to delete those two JS events and do the same thing with CSS. I did that after a
google search ( It was allowed lol ).
• Then, we talked about DOM manipulation and why we shouldn’t do that in a loop. We also
talked about other optimizations like Debouncing and Throttling. He didn’t ask me to implement
though.
• Next, the interviewer started asking me about various JavaScript concepts.
a. What is hoisting in JavaScript?
b. How let and const have affected the concept of hoisting. ( This was a follow-up to the
previous question ).
c. What are closures and their use cases?

d. Shallow copy vs Deep Copy.

e. How to prevent an object from mutation. ( Basically freezing an object).

f. As I had mentioned Next.JS in my resume, he asked me benefits of using it.

g. Client-side rendering and Server-side rendering. (Follow-up question )

h. Next, he gave me a coding problem to solve. The question was about traversing a nested
object. I solved the problem within a minute ( was quite easy ). He asked a couple of
follow-up questions based on the solution.

• The interview ended at this point. He asked me If I have any questions. I asked a couple of
questions about the company then the call was dropped.
• The next day, I received a call from HR and she told me I have cleared the interview and as a part
of the next round of interviews, she shared a take-home assignment over email.

3. Take-home Assignment Round


• In the 3rd round of the interview, I got a take-home assignment. The assignment was about
searching and filtering data using React-Redux and Redux-thunk.
• I asked them for 10 days to complete this considering I have a full-time job. They agreed.

• I submitted the solution in a private repo ( as asked ) and hear back from them after a week. They
considered my solution good and proceed ahead to the next round.

4. Final Tech round with the Co-Founder.


• This was the longest interview I have ever taken. It lasted for 2:00 hrs. 1:30 hrs of interviews and
30 minutes of discussion about the company’s culture, values, and how they operate.
• Again this interview started with an introduction. Then, he looked at my resume and asked the
following questions -
a. What project you’re working on in the current company.

b. Why have you listed so many techs in your skill section? Do you really know them all?

c. I replied: I love to explore different techs that’s why they are so many. I’m well skilled in
React, JavaScript, and Front-end development in general. Also, I have good enough
knowledge of Back-end development using Node, Express, and MongoDB and I’m just
starting out learning Next.JS + TypeScript. ( Interviewer looked Satisfied ).
d. You run a blog, right? Did you build this on your own and using what technologies.

e. I replied: I run a blog but I have not built it on my own and then I explained the supremacy
of Hashnode. 😅
• Next, he looked up my solution to the take-home assignment and cloned the repo, and run the
app locally after installing the required dependencies. He tried and tested every feature and found
everything was working fine. Then, he started asking questions —
a. How would you implement your first assessment ( from round -1 ) in React?

b. How does Redux data flow work?

c. Have you used any middleware in Redux? ( I talked about redux-thunk )

d. What are generators in JavaScript?

e. There was some redundant code in the assignment solution. He asked me to remove that.

f. You have used async-await not promises why? Can you convert them to promises?

g. Have you ever used React-Router ? ( There was a problem in my solution and it was
related to routes that’s why he asked)
h. Do you have any exposure to backend languages or databases?

i. What are you learning currently?

• This was all about this round. We discussed the company and culture afterward.

4. HR Round
• This was a very short call and the interviewer asked me about my previous company and why am
I looking for a change. A few other simple questions were there too.

Check these resources to learn everything related to Web development.

Company -2
Role - Full Stack Developer, 1+ years of experience.
A recruiter approached me via Naukri.com and asked about my availability for the job role and also
asked about my expectations from the new company. The whole interview process had 3 rounds in
total, 2 tech rounds, and one HR. Let’s look at each round of the interview.
1. First Tech Round with a Senior Engineer.
a. Tell me about yourself.

b. Questions from my projects about Serverless, Firebase ( I had used these in my projects )

c. Find the 2nd largest element in an array. I used a naive approach first then he asked me to
solve in O(N) complexity.
d. What is Node.JS?

e. What is a REST API? What are different HTTP methods?

f. Do you know anything about job scheduling?

g. What Node frameworks and databases ( Relational, Non-relational ) you have worked
with?
h. ACID Properties in Database Management.
i. Any knowledge of AWS services? I talked about s3 and the process of uploading images
and showing them in UI. At this point, He started asking JavaScript questions.
j. Explain Null vs Undefined in JavaScript.

k. Next, he gave me two output-type questions, one based on this and another on
promises . There was an issue with this in the output question. Asked me how to resolve
it.
l. Explain this and how its values can be changed at runtime.

m. I explained it in long detail. Almost a brief of this blog. I also talked about the call , apply ,
and bind methods.
n. for...of loop vs for...in the loop. ( Now, React begins 🤪 )
o. What is React.JS?

p. I replied but in my definition, I didn’t mention Virtual DOM. He said I was looking for a
specific keyword that is Virtual DOM.
q. What is virtual DOM?

r. What are the hooks you have used? Explain useCallback vs useMemo with use cases.

s. LifeCycle methods and how to kind of control the lifecycle of functional components?

t. useEffect v/s useLayoutEffect .

• At this point, the interviewer got impressed with my ability to explain answers and ended the
interview by saying “ You seem quite good at JS and React.”
2. Tech Round-2 With a Panel of Two Engineers.

• Again this round started with an introduction and then they asked me about my experience and
expertise.
a. A quiz question involving multiple setTimeout, one of them with a delay of 0 ms. I told them
the output.
b. Even if the delay is 0 ms in one of the setTimeout, why is it not executing immediately? ( I
explained in detail with the Event loop, callback queue etc.)
c. Promise methods. Promise.all() vs Promise.any() vs Promise.allSettled() .

d. Coding Problem - Write poly-fill of Promis.all() .

e. Coding Problem - Same as this. ( Took me around 20 minutes to solve)

f. Closures in JavaScript

g. Authentication and JWT. Refresh Tokens vs Access Tokens.

h. CORS policy.

i. UseEffect and reconciliation in React.

j. useCallback, useMemo and React.memo().

k. useRef and its uses.


l. Technical difference ( apart from syntax difference) between class-based components and
functional components.
m. state management at a component level and at a global level. Redux vs Context API.
Benefits of Redux.
n. GraphQL vs Rest.

o. Request-Response cycle in a client-server model. Where Middlewares fit in this request-


response cycle.
p. Client-side vs Server-side rendering.

q. Could you please tell me about some ways to optimize a web application?

• These were all of the questions. He asked a couple of things I have not heard of. So I don’t
remember to list it here.
3. HR Round

• She talked about company policies and asked me some questions about my previous company.
Nothing much to share.

Company -3
Role - Frontend Developer ( 1+ Years of Experience )
It had 3 rounds, 2 Tech, and 1 HR.
1. Online Assessment.

• The assessment consisted of 30 quiz questions and 2 coding problems to be solved using the
React.JS library.
• Quiz questions were easy/medium level from JavaScript and React.JS. The coding questions
were pretty easy. The first task was to convert Celsius to Fahrenheit and vice-versa. We had two
input fields, one for Celsius and the other for Fahrenheit. Change in any one of these two inputs
should reflect in another. The 2nd question was just like a simple counter app with some twists.
2. Tech Round with the Tech Lead.

• Every time it starts with an Introduction. Next, he asked about my experience in the previous
company. Technical questions start at this point -
a. Tell me some of the APIs introduced in HTML5. ( I remembered only 2)

b. Ways to store data on the client-side i.e. inside browsers.

c. Session Storage vs Local Storage.

d. CSS combinators. Child vs Descendant Selectors. ( Then he told me about siblings and
adjacent sibling selectors).
e. How does the event loop work?

f. He gave me a coding problem. You can find a similar problem with the solution in my
Github repo here. Give that repository a ⭐ ( I’m saying it again 😆).
g. Lifecycle methods in class-based components. I explained a few and told about useEffect
and functional components. ( He didn’t look satisfied)
h. The component has mounting, updating, and unmounting phases. Tell lifecycle methods of
each of these phases. ( Answered partially)
i. What about getDerivedStateFromProps and getSnapshotBeforeUpdate methods?

j. How to achieve exact behavior like componentDidUpdate in functional components?

k. For the answer to this question, read here.

l. What is debouncing and throttling? Differences between them.

m. Code debouncing. ( I did this and he checked my solution in different ways ).

• Ended the interview.

3. HR Round

• Similar questions like company -1. Nothing much to share.

Company - 4
Role - Frontend Developer ( 2+ Years of Experience )
It had 3 rounds, 2 Tech, and 1 HR.
1. 1st Tech round

• This interview was with a Senior Angular developer.

• It started with introducing each other. Then he started asking questions.


a. How browsers render a web page. ( I told him about the critical rendering path. creation of
DOM, CSSOM, Render tree, Layout, and finally painting).
b. What is the event loop?

c. Follow-up questions on call stack, callback queue, and micro-task queue.

d. Promises and async-await.

e. Classes in JavaScript. Static and instance methods.

f. He given a coding problem to solve. It was related to deeply nested array. Needed
recursion to solve.
g. Then he asked typical JS questions, already mentioned above.

h. After javascript, he started asking about HTML and CSS. He didn’t ask anything related to
React cause he was an Angular developer.
i. What is use of srcset attribute.

j. What is use of data-* atrribute?

k. inline vs inline-block vs block element.

l. Grid vs Flexbox.

m. Order property of flex items. ( This was an Indirect question).


n. Grid area css property.

o. Visibility: hidden vs opacity: 0; vs display: none.

• The interview ended at this point.

2. Tech Round - 2 with the Team Lead.

• Every time it starts with an Introduction. Next, she asked about my experience in the previous
company. Then she started asking technical questions-
a. She started with typical topics like hoisting, var let const , closures etc. I was bored talking
about these in every interview.
b. Client side storage techniques. Session vs Local storage.

c. Given a coding problem to remove duplicates from the string. ( without using Set )

d. Virtual and Real DOM.

e. LifeCycle methods of a React component.

f. Explain useEffect hook.

g. How React performs the updation of web page. Explain the whole process.

h. State management in React apps. Different approaches and their comparison.

i. Given a coding problem to solve in React. We had a list of items and a input box. The list
items must be filtered based on what user types in the input box but only when entered text
has more than 3 characters.
j. Asked some follow up questions related to caching and memoization and ended the
interview.

3. HR Round

• Similar questions like company -1. Nothing much to share.

Tips to Answer Questions.


1. Knowing a topic and explaining that in a good way are two different things. Try to get good at
both.
2. When you learn a certain topic, think about how would you answer if someone ask you about this
topic. I’m not saying to memorize the answer but you should have an idea of what to cover in
your answer.
3. Make room for the interviewer to ask questions. ( I will tell you an example)

4. Know when to stop and wait a couple of seconds for the interviewer to respond.

5. In case of coding problems, think aloud. Explain your approach as you go.

6. If you don’t know something, say that you have no idea. Please accept the fact that you ( or
anyone) can never know everything.
7. Example - In one of the interviews, I got a question on this keyword. I covered-
a. this in the global scope.
b. this inside a function ( different scenarios)
c. this inside arrow function and event listeners.
d. I also told the value of this can be altered at runtime using call , apply , and bind . ( It
took me around 90 seconds and I stopped here and gave chance to the interviewer to ask
counter questions).
e. Next, he asked me about the call , apply , and bind methods. ( and this is what I
wanted).

You might also like