Object-oriented programming is a type of programming where programmers can define not just the data type of a data structure, but also the different types of operations (or functions) that can be applied to a data structure. Under this model, a data structure is an object which consists of both data and functions. Programmers can create relationships between different objects. For example, objects can be given characteristics that belong to another object.
Watch the video below first, and then scroll down to view the sample code.
In the example below, the sentence is the object, the length is the property of the object, and the method is the action used to convert the string to uppercase letters. Look at the sample code below to see how properties and methods are used on objects.
Next tutorial: Using the getElementById() method