The foundation of a project’s success is in having the right team in the right place at the right time. Continued progress means having developers you can trust with both strong individual effort and great collaborative work. Getting these developers into your team is the first, and hardest, challenge you have to solve. To begin the process, we’ve prepared a guide for hiring Javascript developers with everything you should be considering when beginning the process and how to start recruiting.
The hiring interview is the best tool you have for the job. By the end of the process, a successful hiring cycle will have narrowed down a broad field of strong candidates to a select few who stand out from the crowd.
Finding class-leading JavaScript developers through the interview process isn’t easy. It’s as much about finding out how candidates solve problems and work towards a solution as it is about evaluating their achievements and successes. Doing both of these in the 90-minutes available is a tough task to manage, but one achievable with a little forward planning.
A successful interview, for both interviewer and interviewee, will bring out the best in all candidates. This means setting challenging tasks to test the far reaches of their skill sets. It gives strong candidates a chance to show what they can do and set themselves apart from the rest of the field. If you need help selecting the right developers, tell us what you need. We can do the work for you and connect you with up to 5 companies within 72h that match your need- all for free.
The interview is a chance to show the kinds of problems and thinking that the company undertakes too. It’s easy to forget that strong candidates are interviewing the company just as much as the company is interviewing them. This may be your only chance to create a positive impression of the organisation and convince talented engineers that yours is the offer to take.
Do’s and Don’ts of Interviewing a Javascript Developer
Do
- Decide who you’re looking for: Whether you’re looking for a fresh graduate or veteran JavaScript pro, be sure to scale the level of the interview and test accordingly. There’s little value in wasting the candidate's time and yours expecting them to lean on years of experience they just don’t have yet.
- Take an interest in the candidate: Invest some time in finding out who’s coming before they attend for an interview. Github, StackOverflow, and related online profiles give you a chance to see some of a candidate’s code out in the wild. The opportunity to ask about real-world projects and experience to such a high degree of detail is too good to pass up.
- Conduct practical tests: The closer an interview is to real-world experience the better. Asking a candidate to implement a small feature, look at existing code to find bugs and improvements, or talking through some design choices is the best indicator you’ll get of their future success.
- Provide technical homework: While it’s bad practice to ask for too much of a candidate’s time, a short technical test ahead of an interview can provide a lot of extra content to discuss and build-on during the process. It gives the right candidate a chance to showcase their skills outside of the allotted 90 minutes.
Don’t
- Interview exclusively in programming jargon: It’s good to know that a candidate knows what SOLID or GRASP stands for and what Agile involves, but the terms themselves don’t build good software.
- Conduct multiple-choice questionnaires online: Writing good code is a complex topic that incorporates areas of design, technical understanding, and engineering. A multiple-choice questionnaire, while easy to grade, assesses none of the relevant skills and simply frustrates good candidates.
- Make the interview process a multi-day experience: A well-conducted phone interview and in-person assessment should give you enough to go on to make a hiring decision. Having candidates in for a three, four, or five-stage interview process shows a disregard for the candidates’ time and your own.
How to Plan a Good JavaScript Interview
Getting the most from the time you have with a candidate is challenging. It’s easy for interviewers to wish there was more time to get a better read on technical and communication skills. Candidates too, often leave wishing there was more time to go into greater detail on problems and tasks.
Asking applicants to take yet more time off and spend more time and money to attend another stage, however, is often an unreasonable request.
A well-planned interview makes the most out of every minute available. In this time you should be able to get a good read on their skill level and personality without making either of you feel rushed. You could break down a typical, 90-minute interview as follows:
- 5-10 minutes discussing relevant experience and previous roles
- 10-15 minutes taking interview questions on JavaScript programming and features of the language
- 40-50 minute coding exercise—including time to discuss the solution
- 20 minutes to address questions from the candidate and discuss the role
While you’re overtly assessing their technical knowledge, you should also be paying close attention to their communication and interpersonal skills too. ‘Soft skills’, the kind you only just get an indicator on in your initial meetings, play a significant role in a team’s success when combined with good technical knowledge and programming experience.
Coding Under Pressure
To help bring out more of the candidate, choose open-ended programming tasks for them to undertake. Tasks without clear and simple solutions give candidates the freedom to showcase skills and experience in their field. It gives interviewers a chance to compare a candidate’s solution against other approaches and talk about the merits and drawbacks inherent in both.
This is the best chance you’ll get to determine how a candidate can fit in day-to-day in a challenging working environment. The best examples will come from problems you have faced before or expect to face in the future.
Included below are some JavaScript code snippets which could serve as warm-up or entry-level exercises. These serve to verify the candidate has some knowledge of the language and a reasonable approach to coding.
To delve further into a candidate’s abilities: there is no substitute for working on real-world problems. Candidates should be typing out their solutions and, ideally, running them during the interview.
Tasks that focus on pen and paper coding or, worse yet, whiteboard coding introduces another abstraction from the real world. Using the keyboard maximises work time and gives you a chance to see how a candidate can debug and troubleshoot in real-time.
Overcoming the Limitations of Technical Interview
As described, technical interviews will always be limited by practical constraints. These practical constraints may also come from the candidate, the company, or just sheer chance.
A great developer, for example, may give a remarkably poor interview on the day. Nerves, illness, or tiredness can overcome anyone from time to time. Conversely, you may give an average candidate a set of problems they have seen before and are well versed in. Either of these scenarios will give the interviewer a false representation of a candidate’s skill-set and experience. There are ways to overcome both.
The first is to eliminate random chance as much as possible. Achieve this by having opportunities to extend, workaround, and dive deeper into challenges. Adding additional constraints, including extra features, or asking a candidate to improve on any given solution is a great way to determine how far their skills and experience reach.
On the other hand, if a candidate does very poorly on one section or task, it can help to have a pre-prepared solution ready to ensure one misfire doesn’t see you disregarding a great developer. Each approach gives an applicant the chance to talk around the problem and work on the next. It’s an opportunity for the right candidate to demonstrate a deeper understanding despite immediate challenges. It offers strong applicants the best chance they’ll get to succeed in the assessment.
Questions with multiple possible approaches are a great help with both sets of candidates. As a general rule for interview assignments—the broader the tests, the more trustworthy the results.
If you need help finding a strong candidate, tell us what you need. We can do the work for you and connect you with up to 5 companies within 72h that match your need- all for free.
Questions a Successful JavaScript Technical Interview Should Answer
At the end of a 90-minute interview, you should begin to have an idea of the kind of candidate you have before you. It’s just enough time to get, in professional terms, the first impression. Some of the questions you should be able to answer should include:
- Can they write good, clean code if they join the team?
- Can they discuss their code, including the benefits and drawbacks of any given solution, and participate in an active way?
- Are they actively curious about the work the company does?
- Do they have interest in, and the capacity for continued professional development?
- Are they a good fit with the working practises established here?
- Are they someone we would enjoy working with?
How these questions are answered depends entirely on who you want to hire. A good interview will tell you these things and more about your candidates and help you find the exceptional individuals who will go on to complete your team.
Interview Questions
General interview questions
Not specific to coding, these questions can help introduce you to the candidate and guide the rest of the interview.
- Why are you leaving your current role?
- What challenges are you looking to undertake in the future?
- What kind of applications would you like to build in the future?
- What type of role would you like to have in five or ten years?
You should come away from these questions with an idea of what the candidate is looking for in the role at your company. These questions may be influential in deciding if the candidate is a good fit.
Industry-Specific Experience
Experienced developers should have a vast array of stories on hand. Asking about these stories and how they overcame the challenges involved, is a great way to figure out if they’ll fit into the environment you’re interviewing them for.
Tell me about how you came to be a JavaScript developer
It helps to introduce the topic while allowing the candidate to talk about what they enjoy about their specialised role and why they’ve stayed in the field throughout their career. This question can help you determine if they’re well-suited to the specific role you have advertised. e.g will they enjoy working on mobile applications or cross-platform frameworks?
Tell me about Javascript applications you’ve developed in the past
A great way to get candidates talking enthusiastically about a topic they know and enjoy. A good answer should talk about the goals and outcomes and provide an overview of the technical work done to reach them. You should get a good idea of a candidate’s passion for their role and their level of interest in creating applications for the company.
Tell me about a time you developed a feature for a user and, once delivered, it wasn’t what they wanted. What did you learn from this experience?
Every developer with a significant degree of experience will have stories like this. Finding out that your candidate can identify where the disconnect happened, figure out what caused the breakdown in communication, and put procedures in place to stop it from happening again is invaluable.
A good answer should include detailed user requirements, documentation, and also anticipating problems and issues the user themselves hasn’t yet thought of.
JavaScript Interview Questions
Included below are some JavaScript interview questions to test a wide range of candidate levels. Model answers are provided, which may cover some of the same topics a suitable response will highlight. However if you are interested in getting to know more about this Frameworks and its future, make sure to read our ultimate guide to JavaScript in 2021.
Basic Interview questions and example answers
Goal: To determine that the candidate knows the basics.
Interviewers may skip these for candidates with a great deal of proven experience or real-world code examples.
What is JavaScript?
- JavaScript is a lightweight, interpreted programming language with object-oriented capabilities.
- Its use is widespread throughout the web to build interactivity into otherwise static HTML pages.
- It is highly popular amongst developers and used in a wide number of frameworks that facilitate cross-platform mobile development too
What are the Advantages of JavaScript web pages?
- Less server interaction: You can validate user input before sending the page off to the server. This saves server traffic, which results in a reduced load.
- Immediate feedback for users: Interaction happens on the page rather than waiting for the browser to refresh.
- Increased interactivity: You can create an interface with mouseover events and response to user gestures and keyboard input.
- Richer interfaces: You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.
Describe some features of JavaScript?
Answers could include:
- It is a lightweight, interpreted programming language.
- It is designed for creating network-centric applications.
- It is complementary to and integrated with Java.
- It is an open and cross-platform scripting language.
What are the scopes of a variable in JavaScript?
A variable’s scope defines the region of the program in which it can be called. Javascript variables can have two possible scopes
- Global Variables−A variable with global scope. A global variable is visible everywhere in your JavaScript code.
- Local Variables−Visible only within a function where it is defined.
Javascript Feature Questions
Goal: Test a candidates knowledge of JavaScript programming
What is the difference between Attributes and Property?
- Attributes- provide more details on an element like id, type, value, etc.
- Property- is the value assigned to the property like type=” text”, value=’Name’ etc.
What is a Closure?
A closure is defined as a function and its references to its surrounding state. It serves to give internal function access to the scope of an external function. Closures are created in Javascript every time an internal function is created.
Closures make it possible for a function to have private variables. Closures in JavaScript are also frequently used in event handlers and callback functions.
What is a Promise?
A promise is an object that may produce a value in the future. These differ from observables or tasks in that they begin their task as soon as their constructor is invoked. All three are used to compute asynchronous operations.
A promise may be in three possible states:
- Fulfilled: resolve() was called by the program—May return a value or a reason the value has not been returned, e.g. network error
- Rejected: reject() was called by the program
- Pending: not yet fulfilled or rejected
Javascript Coding Examples
A good candidate should be able to outline or code solutions to the following tasks, giving you a fair assessment of their abilities and working practices. These are short enough and simple enough to be done on paper in a pinch.
Write a function to check if a number is an integer
function isInt(num) {
return num % 1 === 0;
}
A simple solution to separate decimals from integers is to determine if it is divisible by 1
Write a function to sum an array of numbers
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const sum = (acc, current) => acc + current;
const res = numbers.reduce(sum, 0);
Another solution would be for the candidate to create a forEach loop and iterate manually over the array to increment the count with each item.
When asked to talk through this solution, the candidate should describe the sum function’s first argument as the accumulator and the second as the current element in the array. A candidate may write additional code to ensure that an empty array can not be passed as an argument.
Write a program using a closure to multiply two numbers
function multiply(a) {
return function(b) {
return a * b;
}
}
Write a function which makes use of currying to return a user’s name in first, last format
Calling name(“first”)(“last”) should return “Name: last, first”
function name(first) {
return function (last) {
console.log("Name: " + last + ", " + first)
}
}
This may be referred to as a higher-order function or partial application instead. Typically, more advanced candidates will have a good grasp of these concepts.
Real-World Coding examples
While the questions and tasks listed so far should give you a strong idea of a candidate's ability to use Javascript, it will take more life-like tasks to gauge their complete abilities as a developer.
The best tasks and examples come, very often, from your own codebase. Tasks which you have tackled before, even tasks which current developers have struggled with. Getting the candidate’s input on these problems is an excellent way to get an idea about what they can bring to the team.