Objects
The concept of an “object” in programming is a made up abstraction to make programming easier. Computers don’t require us to use objects to code software. Humans invented this concept to make building, organizing, and maintaining code easier and consistent. What computer scientists really did was steal this pattern from dealing with real objects we work with everyday.
Let’s take a car for example. A car is an object that can do certain things. A car can drive, break, turn, and lock the doors. If we were to implement a car in our code we would create an object and call it “Car”. This car object would have methods (fancy word for functions that are defined in an object) that could drive(), turn(), brake(), and lockDoors(). The actual syntax would look something like this if you were doing this in JavaScript:
var car = new Car(); // manufacture a new car object and store it in a variable
car.drive(); // make the car drive
car.brake(); // make the car brake