OOP in JAVASCRIPT

Photo by Christopher Gower on Unsplash
  • Encapsulation: Hide information. This property does not allow the user of objects to change the intrinsic state of an object. Only the internal methods of an object allow to change its state. It is up to the code writer to allow the external environment to influence the internal data of an object. This is property to ensure the integrity of the object.
  • Inheritance: This property allows one object to make available properties that another object already has through inheritance. This allows objects to share or extend existing properties without having to redefine. However, not all object-oriented languages ​​have this property.
  • Polymophism: Demonstrated through sending the message (message). Sending these messages is comparable to calling the inner functions of an object. The methods used to respond to a message will depend on the object to which the message is sent will have a different response. The programmer can define a property (eg, through the names of methods) for a series of objects that are close together, but when executed using the same name, the execution of each object will automatically. happened according to the characteristics of each object without confusion.
OOP in JAVASCRIPT

OOP in Java

OOP in JavaScript

Conclusion

--

--

--

Always be nice to anybody who has access to my toothbrush.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

JavaScript: The Event Loop

Diagram of the JavaScript Runtime

HTML5 Canvas Crash Course using JavaScript

JavaScript: Use Destructuring Assignment over Function Parameters

Let’s explore Slice(), Splice() & Spread Syntax(…) in JavaScript

“That’s not flying, that’s just falling with style.” — Woody Pride (Toy Story)

How to use local Images dynamically in React Native

Application Frameworks — SE3040

Manage Environment Variables in your NodeJs Application with dotenv

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Beribey

Beribey

Always be nice to anybody who has access to my toothbrush.

More from Medium

Javascript — Tricky Questions-Array

JavaScript & Version Controlling

Difference between single-threaded and multithreaded process

JavaScript Basics

duckett books for html css & javascript

.filter() array method