If this is the case, first of all, don’t worry. We’re going to walk through exactly how you should spend your time to give yourself the best shot at success.
Every interview process is different—companies hire in different ways because of time constraints, the separation of human resources and tech departments, and general confusion on what makes a good developer and what type of developer is required. Throw into the mix that evaluating technical competence is incredibly difficult and the result is widely varying interview methods.
As a result, hiring processes can vary widely between companies. But no matter where you’re interviewing, you can build a solid foundation of knowledge to give you the best chance at success—and we’ve compiled that foundation in this post.
Phase 1) The initial phase is usually comprised of simple, short questions intended to quickly sift through the first set of candidates. This stage looks like (what is often deemed) “trivia,” as it can be crude, simplistic questions about core language concepts. While many in the industry are opposed to this type of interview testing, it’s still quite a common practice. So, like it or not, you may face this hurdle first, so you should be prepared.
In this article, we’ll cover just the first phase, broken down into the following sections:
- Programming Paradigms/Patterns—Design patterns, object-oriented programming (OOP) versus functional, etc.
- Types, Grammar, and Syntax—The more fiddly bits of the language
Let’s take a look:
- Take Your Time—We’re going to cover a lot of ground in this post. Don’t try to take it and digest all the information here at once. It will take time, so pace yourself.
- Experiment in Code—Trying out code is the best way to gain an understanding of an unfamiliar concept.
- Focus on Your Weaknesses—Scan through the list of questions, make a note to yourself next to the concepts you are not familiar with, and consider starting there.
- This Isn’t a Memory Test—Programmers have access to the internet and interviewers know this. Don’t try and simply memorize minutia, like every helper function.
- Focus on Concepts over Details—Just as you shouldn’t try and memorize this list, you also should focus on concepts rather than details. For instance, learn what a map function does conceptually; don’t agonize over the ordering of the properties that are passed in.
- Vary Your Media—Try swapping media to break monotony while preparing. Practical coding, talking through with a friend, or using flash cards are good alternatives to reading, but really diving in and experimenting is your best bet.
- Answer Out Loud Before Reading the Answer—It might be tempting to just jump to the answer here, but resist this urge. Instead, read the question out loud to yourself and practice saying the answer to your prospective employer.
Part 1: Core Concepts
Hint: It is related to asynchronous behavior.
Hint: It has to do with scoping and mutability.
3) What is short-circuit evaluation and why does it matter?
Hint: It has to do with logical operators (AND, OR, NOT).
Hint: It’s related to performance.
6) What is immutability?
Hint: It has to do with the ability to change data.
Category: Programming Paradigms
7) What is “pass by reference” versus “pass by value”?
Hint: It’s about object creation.
Hint: One is about ideas of inheritance, the other about composition.
9) What is functional programming?
Hint: The clue is in the name.
10) What are the main ideas behind OOP?
Hint: Think about how code is shared.
11) What are the pros and cons of functional programming versus OOP?
Hint: Think about shared state, side effects, and simplicity.
12) What is the difference between class and prototypal inheritance?
Hint: Think of how objects can be replicated.
Hint: Think about how functions are called.
14) What is a “recursive” function?
Hint: It allows us to iterate through a function even if we don’t know how many loops we’d need.
Category: Scope and Closures
15) What is a closure?
Hint: It’s not about what is declared, but when.
17) What is lexical scope?
18) What is an immediately invoked function expression (often referred to as IIFE) and why is it important?
19) What is currying?
Hint: It relates to functions and how they can be used to encapsulate scope.
Category: Types, Grammar, and Syntax
In this section, we’ll cover the more fine-grained details of the language. Syntax is important, as it will define the way different code functions. For instance, it’s easy to dismiss the difference between a template literal and a regular string; it’s a subtle difference in syntax, but it has large functional differences.
Hint: It is related to backward compatibility.
21) In ECMAScript 2015 and later, what is object destructuring?
Hint: It has to do with how we assign values to our scope from objects.
22) What is an interpolated expression (template string)?
Hint: It has to do with mixing strings and variables together.
Category: Asynchronous Programming and Performance
Hint: It has to do with the single-threaded environment.
25) What is a promise?
26) What is a memory leak?
Hint: When the language cannot release memory, it causes this issue.
Hint: There are a few answers … consider concepts like scoping, Document Object Model (DOM), and closures.
28) What are the async/await keyword(s) and what are their advantages and disadvantages?
Hint: It has to do with how you can write asynchronous code.
29) What is a pure function?
Hint: It’s related to side effects.
30) What is a function “prototype”?
Hint: It’s related to how functions share behaviors.
31) What are the advantages/disadvantages of using a functional iteration method when compared with a “for loop”?
Hint: It has to do with scoping.
32) How do you set a default parameter value for a function?
Hint: There are three ways to do this: one with ES5 syntax, one with ES6.
33) What is the difference between a function and a method?
Hint: Function is declaration.
34) What are the different ways to define a function?
Hint: Think about classes and variable assignment.
35) What is a “fat arrow” function?
Hint: Think about the function definition.
36) When would you use a fat arrow function?
Hint: Think about where using a fat arrow could be bad.
Hint: Typically, they are used to make arrays shorter (in different ways).
38) What is the difference between .call, .bind, and .apply?
Hint: They all relate to the this keyword; the difference is in how they’re used.
39) What is a debounce/throttled function?
Hint: Debounce is used for performance reasons.
Phew! That was a lot of trivia! One of the best ways to ensure that your knowledge has sunk in is to prepare with a partner or friend or write down the answers to the questions as you go.