diffrence

 

Functional ProgrammingObject Oriented Programming

यह प्रोग्रामिंग emphasizes उन कार्यों के उपयोग पर जोर देता है जहां प्रत्येक फ़ंक्शन एक विशिष्ट कार्य करता है।

This programming paradigm is based on object oriented concept. Classes are used where instance of objects are created
Fundamental elements used are variables
 and functions. The data in the functions
 are immutable(cannot be changed after creation).
Fundamental elements used are objects and methods and the data used here are mutable data.
Importance is not given to data but to
functions.
Importance is given to data rather than procedures.
It follows declarative programming model.It follows imperative programming model.
It uses recursion for iteration.It uses loops for iteration.
It is parallel programming supported.It does not support parallel programming.
The statements in this programming
 paradigm does not need to follow a particular order while execution.
The statements in this programming paradigm need to follow an order i.e., bottom up approach while execution.
Does not have any access specifier.Has three access specifiers namely, Public, Private and Protected.
To add new data and functions is not so easy.Provides an easy way to add new data and functions.
No data hiding is possible. Hence,
Security is not possible.



Provides data hiding. Hence, secured programs are possible.






Advantages of closures

Here are some advantages of closures:

  • They allow you to attach variables to an execution context.
  • Variables in closures can help you maintain a state that you can use later.
  • They provide data encapsulation.
  • They help remove redundant code.
  • They help maintain modular code.
NPM & NPX
NPM= अगर permanent package को downloads करना होता है तो NPM का use होता है 
NPX= अगर packageको one time  use करना है तो npx use करते है 
और ज्यादातर npxका ही use होता है 






Comments