Intro to OOP: The everyday programming style
Object-oriented programming (OOP) is sometimes portrayed as difficult and intimidating. The truth is that object-oriented programming uses a very familiar model to help make programs easier to manage. Let’s take another look to see how easy it is to understand this very popular and influential programming style.
Objects are familiar
In everyday life, we interact with objects in the world. Moreover, we recognize individual objects as having defining characteristics. The dog on the couch has attributes such as a color and a breed. In programming, we call these attributes properties. Here's how we would create an object to represent a dog and its color and breed in JavaScript: