10 Interview Questions Every JavaScript Developer Should Know

10 Interview Questions Every JavaScript Developer Should Know

Preparing for a JavaScript developer interview? Here's a guide to the top 10 questions you might face. Master these, and you'll be one step closer to landing that dream job.

Update: 2020

Thanks in part to warnings from influential software developers and framework authors, the trend of overusing class inheritance in JavaScript has mostly died.

What is functional programming?

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

Cons: Objects and behaviors are typically tacked together on the same entity, which may be accessed at random by any number of functions with non-deterministic order.

Over exploitation of FP features such as point-free style and large compositions can potentially reduce readability because the resulting code is often more abstractly specified, more terse, and less concrete.

What are Two-way Data Binding and One-Way Data Flow?

Two way data binding: UI fields are bound to model data dynamically such that when a UI field changes, the model data changes with it and vice-versa

It Starts With People

Focus on the 3 P’s

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

Monolithic: app is written as one cohesive unit of code whose components are designed to work together, sharing the same memory space and resources

Two programming paradigms that are important for JavaScript app developers

Prototypal inheritance

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

It means that code reuse should be achieved by assembling smaller units of functionality into new objects instead of inheriting from classes and creating object taxonomies.

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

Asynchronous programming means that, barring conditionals and function calls, code is executed sequentially from top-to-bottom, blocking on long-running tasks such as network requests and disk I/O.

Conclusion

Stick to high-level topics

What is the difference between classical inheritance and prototypal inheritance?

Class Inheritance: instances inherit from classes, and create sub-class relationships: hierarchical class taxonomies. Instances are typically instantiated via constructor functions with the new keyword.

When is classical inheritance an appropriate choice?

Rarely, almost never, or never.

When is prototypal inheritance an appropriate choice?

Delegation

Source

Get in