6 Perfect JavaScript Interview Questions

Ask the Right Javascript Interview QuestionsAsking the right questions to gauge an applicant’s knowledge of a any computer language can be tricky. This is particularly true for JavaScript interview questions. A single person does not need to know the language in its entirety to use part of it. They might be able to use Javascript without actually understanding how it works. 

Its like the English language in that way. A kindergartner might be able to rearrange words into a sentence, but that doesn’t mean they can write a paragraph with adjectives and proper punctuation. They know enough to communicate what they need. However, they’re not going to write the next best creative nonfiction novel.

The simple question “Are you familiar with JavaScript?” in an interview is therefore not sufficient enough to determine the level of knowledge of the language. Every eleven year old boy has had to download the newest version of their web browser to support JavaScript. He’s familiar with JavaScript, but that doesn’t mean he knows it.

To engage the applicant in a conversation about the depth of their knowledge, you need to curate the right JavaScript interview questions.

Quick History Lesson

Most people interested in JavaScript interview questions work at creative agencies and want to hire a new web developer. But it’s possible you’re a creative on the job hunt, curious about what you need to know about JavaScript to get hired.

If the latter is the case, here’s a quick review of JavaScript:

People created JavaScript in the mid-90s because they were tired of websites like this and this.

Can you imagine? Anyway, they wanted to do cool stuff on websites. Think:  Contemporary Analysis’s can-jeweled game at the bottom of their homepage.

And from the ancient desire to make things move, man created JavaScript. It is the most widely used computer language, and can be found on almost every webpage.

Unfortunately, the title “web-developer” is used pretty loosely these days. In some cases, people deem it appropriate to interchange it with “graphic designer”. Websites like Weebly and Blogger allow people to upload pretty designs and far-out ideas. This is wonderful in its own way but doesn’t not make a person a web developer or JavaScript expert.

To weed out those 11 year old boys and self-promoting bloggers, we’ve come up with some JavaScript interview questions to figure out who can really speak the language.

For a web-developing position, that means you want to hire someone that can eventually train another to take their job. A complete knowledge of JavaScript means the candidate can not only use JavaScript with skill and ease, but communicate the language with confidence. Don’t drive the interviewee into the ground with question after question about the different functions of JavaScript, but give them a chance to briefly communicate their knowledge.

Theory-based JavaScript Interview Questions

These aren’t the nitty gritty coding questions — we’ll get to those in a minute. These are more about the theory behind JavaScript. When hiring someone for any position, keep in mind that the new hire is an investment.

3 Theory-based Questions (information gathered from thoughtco):

  1. How would you describe HTML, CSS, and Javascript to a client? 
  2. JavaScript supports 2 programming styles. What are they? Describe them to me.
  3. What is the difference between a compiled and interpreted language? Which one is JavaScript?

What to expect in the applicant’s answers

  1. To run JavaScript, a user must know HTML, the language behind every website. To know HTML, the user must also understand CSS, which is the formatting behind HTML. The applicant should communicate these facts to you, along with examples of both types of code. Since HTML is a markup language (as opposed to a programming language) a user must know the language in full to use it in any part. A true JavaScript connoisseur can tell you a lot about HTML.
  2. JavaScript supports procedural and object-oriented programming styles. Procedural programming means that there is a set “procedure” to the language. As in, these certain steps with give you this output. This order of words completes this command. Object-oriented programming focuses on actions desired, not the steps. It’s sort of like getting data to dance. If you need a graphic to do something on a website, how can you use data to manipulate it?
  3. A compiled computer language is processed through a “compiler” so the computer understands it. It takes some patience, as you have to write the project in entirety before you can check if it works. An interpreted language, like JavaScript, transcribes code for the computer when individual functions are run. You can make changes as you run individuals codes. This makes interpreted language a whole lot more user friendly.

Did the applicant speak with confidence and ease when you threw these theory-based questions at them? Great. Now let’s see how they stack up with the nitty gritty code details.

Practical-based JavaScript Interview Questions

The applicant might be able to talk the talk, let’s she if she can, well, you know, actually use JavaScript. Questions developed from JavaScript.com.


  1. Name some properties and methods of strings.
  2. What is the most common type of conditional in JavaScript?
  3. How do you get an object’s key?

What to expect in the applicant’s answer

  1. One property of strings is “length”. Length keeps track of how many characters it has. The “toLowerCase” method converts the input to lowercase font. The “toUpperCase” method has the same effect, but in uppercase. The “trim” method deletes the white space around the text.
  2. The most common conditional in JavaScript is the “if” statement. Conditionals control the behavior of code, determining if they can run. “If” statements run if the conditional in the parenthesis is “truthy” — aka true in the boolean context.
  3. There are two ways to get an object’s key. The first way is to use dot notation. In this way you name the key after the period. Or, you can use bracket notation. This is done by writing the name of the key inside square brackets, inside the string.

Other Javascript Interview Resources.

These are pretty broad questions, but they work well because you can answer them without a computer. This website here is a good guide for more complicated JavaScript interview questions. Unlike the questions we at Bric suggested, however, they require the interviewer and interviewee to sit in front of a computer to demonstrate the answers.

JavaScript plugins make it easy for anyone to use JavaScript. Websites like Unheap allow anyone to find a code for a function they need. Just because an applicant relies on plug-ins doesn’t mean they don’t understand JavaScript. Plug-ins are a great way to speed up the web development process. Still, plug-in users applying for web developer jobs still need to answers these questions correctly. They should still know the language.

These JavaScript interview questions are a guide to find out which applicants know the language and which don’t at all. To examine the quality of their JavaScript skills, you as the creative agency will need to examine their resume and research work they’ve created. That will perhaps be the second step of the interview process. For now, however, these questions are a good start to get the right applicants walking through your door.