OOPs is the programming style which organize code into Objects rather than lists of instructions. It helps developers to model complex systems by grouping related data and behaviours together.
Content List
What Object-Oriented Programming (OOP) means
Real-world analogy (blueprint β objects)
What is a class in JavaScript
Creating objects using classes
Constructor method
Methods inside a class
Basic idea of encapsulation
What Object-Oriented Programming (OOP) means
A object oriented programming is a paradigm (a way of thinking) where you view progarm as collection of objects that interact with each other.
Instead of writing a script with lots of functions, you organize them as specific data (properties) and actions (methods) into a single unit called Object . It make you program to easy to reuse, organize, and scale as project get bigger.
Real-world analogy (blueprint β objects)
The easiest way to understand OOPs is to think about architect and house:
1.β¦