10 Interview Questions Every JavaScript Developer Should Know - Deepstash
10 Interview Questions Every JavaScript Developer Should Know

10 Interview Questions Every JavaScript Developer Should Know

Curated from: medium.com

Ideas, facts & insights covering these topics:

11 ideas

·

6.37K reads

41

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Marcus Lemonis

“People, Process, Product”

MARCUS LEMONIS

136

1.42K 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.

133

931 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.

135

793 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.

130

578 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.

127

380 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.”

124

363 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()`.

122

282 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. 

125

308 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. 

124

294 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.

124

277 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. 

129

746 reads

IDEAS CURATED BY

dustinspe

Secretary at a company

Dustin Spencer's ideas are part of this journey:

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

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

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