10 Interview Questions Every JavaScript Developer Should Know

🧵 Thread...
1. Name two programming paradigms important for JavaScript?

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

Functional programming produces programs by composing mathematical functions and avoids shared state & mutable data
3. What is the difference between classical and prototypal inheritance?

Class Inheritance: instances inherit from classes and create sub-class relationships

Prototypal Inheritance: instances inherit directly from other objects
4. What are the pros of functional vs object-oriented programming?

Using the functional paradigm, programmers avoid any shared state or side-effects like OOP, which eliminates bugs caused by multiple functions competing for the same resources
5. When is classical inheritance an appropriate choice?

Never, or almost never

Certainly never more than one level

Multi-level class hierarchies are an anti-pattern
6. When is prototypal inheritance an appropriate choice?

In situations where modules or functional programming don’t provide an obvious solution

And any time you need inheritance
7. 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
8. What is one-way data flow mean?

It means that the model is the single source of truth

The effect is that data always flows in a single direction, which makes it easier to understand
9. What is microservice architectures?

It means that your app is made up of lots of smaller, independent applications capable of running in their own memory space and scaling independently from each other across potentially many separate machines
10. What is asynchronous programming?

It makes it possible to express waiting for long-running actions without freezing the program during these actions. JavaScript implement this style of programming using callbacks, functions that are called when the actions complete
Thanks for reading!

❤️ and share this thread if you found it helpful.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Nick Bull JS

Nick Bull JS Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @nickbulljs

19 Oct
Complete Guide How To Code Review

Best practices from Google, Apple, Facebook, and Amazon

🧵 Thread 🧵

#100DaysOfCode
Let's start with the question:

What’s the end goal of the code review?

The primary purpose of the code review is to make sure that the solution is solving the problem in the best possible way. From the code and product perspective.
But how do you determine if the solution you are reviewing is the best way to solve the problem? In other words, how to code review?

Let’s deep dive into it.
Read 23 tweets
17 Oct
6 Ways To Improve Web Performance With Preload Content

prefetch vs preload vs preconnect vs dns-prefetch vs prerender vs modulepreload

*advanced javascript techniques*

🧵 Thread... Image
1. preload

<link rel="preload"> tells the browser to download and cache a resource (script or stylesheet) as soon as possible

It’s helpful when you need that resource a few seconds after loading the page
2. prefetch

<link rel="prefetch"> tells browser to download and cache a resource in the background

The download happens with a low priority, so it doesn’t interfere with more important resources

It’s helpful when you need resource on a subsequent page
Read 11 tweets
15 Sep
21 Must-Read Books For Programmers

(become a Senior Developer in a year)

🧵 Thread...
1/ Personal Effectiveness

- The 7 Habits of Highly Effective People: Powerful Lessons in Personal Change
- Great at Work: How Top Performers Do Less, Work Better, and Achieve More
- The Checklist Manifesto: How to Get Things Right
2/ Writing Code

- Code Complete
- Clean Code: A Handbook of Agile Software Craftsmanship
- Code Simplicity: The Fundamentals of Software
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!