JavaScript
  • JavaScript Introduction
  • JS Engine
  • V8 Engine
  • First-class function
  • Optimized Code
  • Call Stack & Memory heap
  • Single Thread
  • JavaScript RunTime
  • Nodejs
  • Context and Environment
  • Hoisting
  • Functions
  • Arguments
  • Variables
  • Scope
  • IIFE
  • this
  • call(), apply() and bind()
  • currying
  • Types
  • Type Coercion
  • Functions as Object
  • HOF (Higher Order Function)
  • Two pillars of Javascript
  • Closures
  • Prototypal Inheritance
  • OOP and FP
  • OOP
    • 4 principles of OOP
  • FP
    • Pure function
    • Imperative vs Declarative
    • Immutability
    • HOF and Closures
    • Currying
    • Partial Application
    • Compose and Pipe
  • Composition vs Inheritance
  • OOP vs FP
  • JS working
  • Promises
  • Async Await
  • ES5 - ECMAScript 2009
  • ES6 - ECMAScript 2015
  • ES7 - ECMAScript 2016
  • ES8 - ECMAScript 2017
  • ES9 - ECMAScript 2018
  • ES10 - ECMAScript 2019
  • ES11 - ECMAScript 2020
  • ES12 - ECMAScript 2021
  • JOB Queue
  • Promises Execution
Powered by GitBook
On this page

Was this helpful?

OOP vs FP

OOP:

  1. Organizing a code into a unit.

  2. Grouping things into a box, known as states and action performed is methods.

  3. Objects are the first class citizens.

  4. Principles are Abstraction, Encapsulation, Inheritance and Polymorphism.

  5. Few operations on common data.

  6. State can be modified (mutable).

  7. Has side effects.

  8. Imperative.

FP:

  1. Avoiding side effects and writing pure functions.

  2. Combination of data is functions. The result will be based on the input data without any side effects and is immutable.

  3. Functions are first class citizens.

  4. It all around the pure function and compose.

  5. Many operations on fixed data.

  6. State is immutable.

  7. Pure and no side effects.

  8. Declarative.

PreviousComposition vs InheritanceNextJS working

Last updated 5 years ago

Was this helpful?