Sitemap

JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

What Are JavaScript Programming Paradigms?

And where do React Hooks fit in?

8 min readAug 26, 2019

--

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
Press enter or click to view image in full size
Image
Adapted from this article by Bhumika Rani by Geek for Geeks

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.

Press enter or click to view image in full size
Image
(Photo by Markus Spiske on Unsplash)

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.

Press enter or click to view image in full size
Image
(Photo by Chris Ried on Unsplash)

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…

--

--

JavaScript in Plain English
JavaScript in Plain English

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Dr. Derek Austin 🄳
Dr. Derek Austin 🄳

Written by Dr. Derek Austin 🄳

Indie Game Dev Ā· AI Context Engineer Ā· I teach LLMs to think Ā· Full-Stack SWE since 2005 Ā· BS & MS in Bioinformatics at age 19 Ā· Doctor of Physical Therapy

No responses yet