linkedin Skip to Main Content
Just announced: CoderPad Play! Engage your team with fun technical challenges.
Back to blog

Javascript Interview Questions For Candidates


So You Want to Conduct a Javascript Technical Interview?

There’s no question that Javascript has a major place in the canon of programming languages. If you haven’t already, the odds are good you’ll eventually need to put candidates through their paces and see just how conversant they are in this front-end tool.

So how can you structure a Javascript-based technical interview to get the best out of your candidates and reflect well on your company?

Jonathan Geggatt, CoderPad’s VP of Eng, takes us behind the scenes to discuss how to do exactly that.

Managing State

A major consideration when working with modern Javascript frameworks (like React) is dealing with state management. Ask your candidates about strategies they’ve used in the past, libraries they’ve worked with, and why it’s important to get it right. Their answers around communicating with APIs and pulling different datasets into the system should reflect an understanding of the complexity that’s correlated with more features in the product.

“There’s no one right way to do it,” says Geggatt. “There are a lot of competing libraries that help you manage it – and which one is best can sometimes rise to the level of a religious discussion for some engineers. What you want to see is this person’s ability to explain why they’d choose one or the other.”

At a senior level, look for the ability to stand up the capability on their own with the appropriate justification for the merits of their choice. For junior roles, it’s more about if they can explain the concepts like dispatching actions or if they’ve worked in Redux, MobX or React in prior roles.

Been Bitten

At least one section of the interview needs to be focused on concepts like Closures, Functional Programming (pure functions), and immutability. If that candidate has been bitten – gone through an issue related to concepts that were difficult and resolved them – that’s a huge plus.

“You want to see if they have some pre-existing knowledge on concepts or, at least, understand why it’s an important problem to solve,” says Geggatt. “If not, recognize you will be going through the learning process on the job with them. That might be okay if it’s a junior person but it’s definitely not as desirable at a more senior level.”

As a hiring manager, you may want to bring in examples of particular concept issues your company has faced and see the approach your candidates would take. Make sure to ask about best practices they’ve learned from previous companies (or, even better, developed on their own).

Ambition vs Execution

Another area to probe: ambition versus execution. When engineers get too ambitious, performance issues can be the result. You’ll want to triple check that a desire to dream big is also coupled with a powerful foundation of basic skills.

That means querying against APIs efficiently, browser memory management, experience with dev tools and build optimization, etc. You may want to spend a little time with a library like D3, the de facto visualization standard for dealing with large datasets. Do they have experience with the tool? What did they use it to address? If they’ve never used it, what problems would they solve with it at a conceptual level?

Selecting for Senior Savvy

The ideal senior candidate will be able to prove their understanding of key concepts more than just surface-level. Javascript is a functional programming language – very different from the object-oriented programming most are taught, says Geggatt.

Ask them about function composition functions together, using examples, then explain what the output would be. It’s useful to see if they can share what will occur as a result of a certain function being passed to a second, then a third, function. You’ll also want to delve into closure (the scope of a variable). Do they understand how closures work in different instances, specifically what’s in scope? Can they define what the expected value of a variable should be – or redefine that variable in a different scope? If their answers don’t inspire confidence, move on.

Also important: how candidates feel about the libraries and frameworks they use. “At this level, you want to see if they can fit into your environment or if they’re rigid about using what they love,” says Geggatt. “Have they mastered the concepts and can they articulate the tradeoffs of different technologies? Things change in Javascript all the time. You need flexibility to adjust and comfort learning on the job as different standards come in and out of favor.”

Finding a Strong, Junior Hire

When hiring junior level talent, you’re looking for curiosity, hustle, potential and some experience (whether it’s self-taught or developed via internships or perhaps a first job). Unlike more experienced candidates, you’re not looking as much for elements like the ability to do abstract work, having established best practices, and the like. Early-career candidates are just not there yet so do your best to set them up for some success.

“Try to give them as many walls, some contained space, so they don’t have to research concepts to get things to work,” says Geggatt. “An example that’s within the constraints of your codebase, such as a new feature or interacting with other APIs or datasets, is typical.”

Tailoring interviews to scenarios they’d face on the job will give you a really good perspective on how the person might slot in to your team.

“The best junior candidates often have internships in well-structured environments where front-end best practices were well established,” Geggatt adds. “As a result, they didn’t have to learn lower-level details of architecture and could focus their time on building new things that were valuable for the business.”

At any level, for any position, however, the overarching priority should be on improving the experience for customers and users. After all, if what you’re building isn’t fast, functional and a pleasure to use, what’s the point? The best candidates at all levels will frame their responses in this context.

More interviewing resources