Member-only story
What Are JavaScript Programming Paradigms?
And where do React Hooks fit in?
What you need to know for a technical interview:
- Know what a paradigm is and why JS is multi-paradigm
- Be able to explain OOP and prototypal inheritance
- Be able to contrast OOP with functional programming
What are the two programming paradigms important for JavaScript app developers?
JavaScript is a multi-paradigm language, but what does that mean?
Letās define what a programming paradigm is first.
Modern programming languages fall into two categories: imperative (also called procedural) and declarative (also called functional).
Object-oriented programming (OOP), procedural programming, and parallel processing are examples of the imperative programming paradigm.
Functional programming, logic programming, and database processing are examples of the declarative programming paradigm.
Why JavaScript is a āmulti-paradigmā language
JavaScript supports both object-oriented programming with prototypal inheritance as well as functional programming.
Java was traditionally an example of pure object-oriented programming, though the 2018 release added functional programming in the form of something that we will discuss called lambdas.
SQL is an example of pure declarative programming, though there are extensions available from vendors that add procedural elements.
Characteristics of declarative (functional) programming
- You declare what you want to happen, not how itās done.
- There are no loops or conditional statements (for aā¦

