50 Things You Should Know Before Going to a JavaScript Developer Job Interview

Developer interviews are like the wild west. Nobody really knows what they’re doing. Most tech recruiters can’t distinguish between Java and JavaScript (thumbs up if you can). Yet somehow they’re tasked to recruit developers. There’s even a website dedicated to clear up the unfortunate naming, aimed for recruiters.

From time to time, we even get asked for eight years of Swift experience. Considering the Swift language is three years old, don’t let this stop you from applying.

Developer jobs are fun, challenging, and fulfilling. Getting past the interview can be as easy as flying through the door, or can be overly obnoxious to hellish whiteboard challenges. You never know what to expect.

Luckily, we as developers can prepare for all the technical parts and be sure to at least ace those. We never know what silly questions to expect, but at least we can be confident in our technical answers.

Most (modern) companies are waking up to the realization the developer interview process is broken and needs fixing. These are the companies we want to work for.

Without further ado, I gathered 50 questions that I think you should be able to answer before walking to a front-end developer interview.

General questions are questions to get to know you, how you react, think, and how well you fit in the team.

Keep your answers to these questions relatively short and concise, since they don’t carry that much weight.

Don’t trip over your words; take long pauses to think thoroughly about the questions. The questions are meant to “crack” you open so they can taste the yolk.

  1. What excites or interests you about coding?
  2. What did you learn yesterday/this week?
  3. Talk about your preferred development environment. Which Operating System, IDE, and Terminal do you use and why those in particular?
  4. If you could master one technology this year, what would it be? How would you go about mastering that skill?
  5. How did you handle the last disagreement with your direct boss? How did it resolve? Would you give me your boss’s number to check their side of the story? [The last question is a bluff, but be sure to not flinch. No one has the time to call your previous boss.]
  6. What resources, forums, or tools do you use to learn about the latest front end development and design trends? Any favorites and why?
  7. If you joined on a project and they [the dev team] used tabs and you used spaces, what would you do? Would you try to convince the team to use spaces or would you join the herd and use tabs?

[Trick question] — The most correct answer would be to use a standard format tool like Prettier, so everyone’s code will look the same when it’s pushed to the repository. This way you can keep using spaces, and the team is free to use tabs.

If you force your opinion on the dev team, you wouldn’t be considered a team player, and if you used tabs without your full consent and reasoning, you wouldn’t be as motivated as everyone else and are more likely to quit.

8. Can you describe your workflow when you create a web page? What are the first five steps you take when creating a new project?

9. What is a recent technical challenge you experienced and how did you solve it?

10. What actions have you taken on recent projects to increase the maintainability of the code? Any particular programming paradigms you like such as functional programming or test-driven development?

Now that we’re past the general questions and chit-chat, it’s time for the showdown. This where the interview will start shooting technical questions at you.

Note: The questions are more focused toward front-end development but may include back-end, dev ops and problem-solving questions too.

11. Which version control systems are you familiar with? How do you share code between projects in a lossless way?

12. Name four ways to decrease page load.

13What does CORS stand for and what issue does it address?

14Explain what ARIA and screenreaders are, and how to make a website accessible.

15What does a doctype do?

16What are the building blocks of HTML5?

17. Describe the difference between localStorage, cookies, and sessionStorage.

18What are data- attributes good for?

19. What kind of things must you be wary of when designing or developing for multilingual sites? How do you serve a page with content in multiple languages?

20What is progressive rendering?

21. Explain how this works in JavaScript. How does this work in classes versus functions?

22. Describe event bubbling and event capturing.

23Explain variable hoisting.

24. Explain the difference between:

  • function Animal() {}
  • var animal = Animal()
  • var animal = new Animal()

25. What’s the difference between host objects and native objects?

26What’s a typical use case for anonymous functions?

27Explain how JavaScript prototypal inheritance works.

28. What is a closure, and how/why would you use one?

29. What’s the difference between null and undefined?

30. What is the difference between == and ===?

31. What is Webpack? What problems does it solve?

32. Have you ever used a front-end framework or library? Which one?

33. Why is it called a Ternary operator; what does the word Ternary indicate?

34. What tools and techniques do you use debugging JavaScript code?

35How do you debug JavaScript code that runs on the server, e.g. NodeJs?

36What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?

37. Given this code, how would you implement the duplicate function?

// make this work
duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5]

38Can you give an example of a curry function and why this syntax offers an advantage?

39. Can you give an example of destructuring an object or an array?

40. Who invented JavaScript and why is it called JavaScript?

41. What is the difference between these two functions?

// What’s the difference?
const sayHello = name => console.log(name)
function sayHello(name) {
console.log(`${name}`)
}

42Why and when might you want to create static class members?

43. What are the differences between variables created using let, var or const?

44. What happens when you go to a website? What’s a DNS?

45. What is the V8 Engine? Who uses it?

46What does $ in JavaScript code refer to?

47. Explain the difference between layout, painting, and compositing.

48. What are some ways you may improve your website’s scrolling performance?

49. What is the output of the following code?

let fs = require(fs);
console.log(1);
fs.readFile(test.txt, utf8, function(error, data) {
if (error) {
throw error;
}
console.log(2);
});
console.log(3);

50. What is the event loop in JavaScript and what does it do?

If you knew the answers to most questions, well done!

Technical interviews are stressful and can be quite the challenge. I recommend reading through the “Cracking the Coding Interview: 189 Programming Questions and Solutions” to prepare for the interviews.

About the author

Sahil Dhamija

I'm Sahil Dhamija, a full stack developer and an aspiring person with an obsession of all things related to tech and business, and this blog is created to help people learn about tech and business.

View all posts

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *