10 Interview Questions Every JavaScript Developer Should Know - Deepstash
How To Become A Digital Nomad

Learn more about career with this collection

How to build a network while working remotely

How to work remotely

How to manage finances while working remotely

How To Become A Digital Nomad

Discover 92 similar ideas in

It takes just

15 mins to read

Marcus Lemonis

“People, Process, Product”

MARCUS LEMONIS

108

850 reads

Can you name two programming paradigms important for JavaScript app developers?

JavaScript is a multi-paradigm language, supporting imperative/procedural programming along with OOP (Object-Oriented Programming) and functional programming. JavaScript supports OOP with prototypal inheritance.

  • Good to hear: Prototypal inheritance (also: prototypes, OLOO); Functional programming (also: closures, first class functions, lambdas).
  • Red flags: No clue what a paradigm is, no mention of prototypal oo or functional programming.

103

631 reads

What is functional programming?

It produces programs by composing mathematical functions and avoids shared state & mutable data.

  • Good to hear: Pure functions/function purity; Avoid side-effects; Simple function composition; Examples of functional languages: Lisp, ML, Haskell, Erlang, Clojure, Elm, F Sharp, OCaml, et.; Mention of features that support FP: first-class functions, higher-order functions, functions as arguments/values.
  • Red flags: No mention of pure functions / avoiding side-effects; Unable to provide examples of functional programming languages; Unable to identify the features of JavaScript that enable FP.

107

575 reads

What is the difference between classical inheritance and prototypal inheritance?

In JavaScript, prototypal inheritance is simpler & more flexible than class inheritance.

  • Good to hear: Classes: create tight coupling or hierarchies/taxonomies; Prototypes: mentions of concatenative inheritance, prototype delegation, functional inheritance, object composition.
  • Red Flags: No preference for prototypal inheritance & composition over class inheritance.

103

405 reads

What are the pros and cons of functional programming vs object-oriented programming?

  • Good to hear: Mentions of trouble with shared state, different things competing for the same resources, etc.; Awareness of FP’s capability to radically simplify many applications; Awareness of the differences in learning curves; Articulation of side-effects and how they impact program maintainability; Awareness that a highly functional codebase can have a steep learning curve; Awareness that a highly OOP codebase can be extremely resistant to change and very brittle compared to an equivalent FP codebase.
  • Red flags: Unable to list disadvantages of one style or another.

102

241 reads

When is classical inheritance an appropriate choice?

The answer is never, or almost never. Certainly never more than one level.

Good to hear:

  • Rarely, almost never, or never.
  • A single level is sometimes OK, from a framework base-class such as React.Component.
  • “Favor object composition over class inheritance.”

97

239 reads

When is prototypal inheritance an appropriate choice?

Good to hear:

  • In situations where modules or functional programming don’t provide an obvious solution.
  • When you need to compose objects from multiple sources.
  • Any time you need inheritance.

Red flags:

  • No knowledge of when to use prototypes.
  • No awareness of mixins or `Object.assign()`.

96

175 reads

What does “favor object composition over class inheritance” mean?

Good to hear:  

  • Avoid class hierarchies. 
  • Avoid brittle base class problem. 
  • Avoid tight coupling. 
  • Avoid rigid taxonomy. 
  • Avoid the gorilla banana problem. 
  • Make code more flexible. 

97

206 reads

What are two-way data binding and one-way data flow, and how are they different?

Good to hear:  

  • React is the new Canonical example of one-way data flow. Cycle.js is another popular implementation of uni-directional data flow.
  • Angular is a popular framework which uses two-way binding. 

98

196 reads

What are the pros and cons of monolithic vs microservice architectures?

Good to hear:  

  • Positive attitudes toward Microservices, despite higher initial cost vs Monolthic Apps. Despite higher initial cost, Microservices tend to perform and scale better.
  • Structure the App so that services are independent from each other. But easy to bundle together as a monolithic App in the beginning.

98

186 reads

What is asynchronous programming, and why is it important in JavaScript?

Good to hear:  

  • An understanding of what blocking means, and the performance implications. 
  • An understanding of event handling, and why its important for UI code. 

101

647 reads

CURATED BY

dustinspe

Secretary at a company

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates