8 min. read

June 17, 2021


20 JavaScript Interview Questions to Help You Prepare for Your JavaScript Interview

20 JavaScript Interview Questions For Your JavaScript Interview

Patrick Zawadzki

Patrick Zawadzki, Senior Software Engineer

Tech interviews are tricky. Every company has different rules and expectations as to what their interview process entails, which can make it extra hard to prepare well for an interview. There are, however, some tips and tricks to interviews and javascript interviews that can help you land your next technology role, here are some of the best ones I’ve seen in my career thus far.

S.T.A.R. Phrasing

S.T.A.R. has been around for quite a while and really can be applied to any job you are interviewing for. It stands for Situation, Task, Action, and Response. This response format helps interviewees respond to those tricky “tell me about a time you…” questions. Before you begin your interview, take some of the most memorable experiences you’ve had in your career and practice the responses in this format to help you be clear and concise when in an interview. Not only does this help accidentally over-explaining but it can also help interviewers understand your thought process. Helping interviewers understand your thought process is quite important in a technical role, as most technical roles require strong problem-solving skills, regardless of the expertise around them. These don’t have to be technology-based, but there are definite bonuses to being able to clearly explain that one tricky bug you solved and the steps you took to diagnose it.

Brush up on your fundamentals

Like any programming language, Javascript has its quirks and nuances that make it unique. What’s the difference between the different comparison operators? How does javascript work under the covers? What’s a promise? All of these and plenty of other JavaScript questions are available on plenty of different Github repos and are just a short google search away. These are generally good JavaScript questions to have ready under your belt to help you stay prepared and keep you on your guard. 

Be willing to talk about all your projects, good and bad

Each project, no matter the size, can show off your passion and curiosity. Don’t be afraid to talk about all of the interesting things you learned on a project you had and don’t be afraid to talk about your shortcomings. One of the best traits any developer and engineer can have is learning from their mistakes and analysing past decisions to determine if they were the correct ones. Discuss what you wish you would have done differently, maybe you wish you would have used a different testing library or structured your data store differently. These discussions can help an interviewer see your depth of understanding of the topic and the depth of curiosity you have to solve the problem the right way. We’ve definitely all copy-pasted from stack overflow once or twice, but understanding all of the parts of what you’re pasting is important to explain. Be ready to provide an “elevator pitch” of your project and what its purpose was. This should be clear and concise to help an interviewer understand what problem you were trying to solve. A good elevator pitch will help make your project more interesting and allow you to show your depth of knowledge on the subject. Then be able to dive deeper into the technical implementations of your application. Here are a few things to think about before you discuss your projects with an interviewer.

Frontend JavaScript Questions

  • What library did you use? Why?

  • How did you style your UI? Why did you choose to use that technology?

  • Did you write tests for your UI? What testing libraries did you use?

  • How are you storing and sharing data between items on your front end? What advantages/disadvantages are there to that choice?

  • Are you interacting with any APIs? Which ones and how?

  • Are you doing authentication? How?

  • Are you bundling your code? What type of bundling are you doing? Webpack? Parcel? 

Backend JavaScript Questions

  • How are you sharing your data with your consumers? REST? GraphQL?

  • Do you have any authentication setup? 

  • Where is the data coming from? Are you interacting with any databases or other services?

  • How is your app deployed? Why did you choose that path?

  • If you had a large-scale application, did you implement any scaling procedures? What about recovery methods and caching?

  • Did you write tests? What kind and using what technology? Unit tests? Integration tests?

JavaScript Advanced Interview Questions

  • Did you have a pipeline in place?

  • How did you normally do code deployments?

  • Describe the team. Did you have product managers? UI/UX designers? Testing and QA?

  • Talk about the ideation to completion of a feature you worked on.

  • Did you have code reviews? Who was responsible for them and how did they work?

  • What types of things do you look for when reviewing another person’s code?

  • Any new things in the javascript ecosystem that excite you? What problem do you hope they will solve?

There is often a stigma surrounding failure and doing something the wrong way. However, the greatest way we learn is by screwing up and reflecting. Don’t be afraid to discuss these situations, just make sure you take the time and care to understand what went wrong and why. That goes the same with great success as well. 

It’s also easy to have a massive victory and not think about what got you there. This is a good example to talk about a really tough problem you had, how you solved it, and what you think helped you do that. Maybe you tried debugging a way you hadn’t thought about before, maybe you used a certain tool you hadn’t known about previously. Share this experience with your interviewer and try to explain what you learned from it and how you think it will help you be successful in a new role.

Interviews can be difficult and nerve-wracking but ultimately the best way to feel more comfortable is to take the time to prepare yourself. Going through different examples you’ve listed on your resume, past experiences, and commonly asked questions is a great step to making you feel more comfortable when you’re in the hot seat. This is the time to talk about the things you’re proud of and show them to people who are genuinely interested in learning more. Remember to take a deep breath and pause when speaking during your interviews to help you refocus. You’ve got this!


Read my other article Top Technologies for Javascript Fullstack Developers in 2021.