OOP Introduction
Object-Oriented Programming (OOP) is a style of coding where you bundle related data and behaviour together into objects.
An object can hold values (properties) and functions that act on those values (methods).
- Properties hold data, like a name or a score
- Methods are functions that belong to the object
- You group things that logically belong together
Think of an object as a small machine that keeps its own data and knows how to use it.
Try it yourself
Loading editor…