Object Methods
A method is a function: stored as property because it performed an action.
Object properties can be both primitive values, other objects, and functions: so an object method is an object property that contains a function definition. In other words, Methods are nothing more than properties that hold function values.
Once you have created objects, you want them to be able to do something. This is where methods come in.
A method, in object-oriented programming (OOP), is a procedure associated with a message (invoking) and an object.
A method, in class-based programming, methods are defined in a class, and objects are instances of a given class.
Built-in Methods:
A built-in Method means a built-in function that is built into an application and can be accessed by end-users. However, there are many objects which contain their default built-in methods for different actions, for example, toUpperCase() method, which is a default built-in method of string objects: the action of this method is to convert a text to uppercase.
Notes:
- A method defines the behavior of the objects that are created from the class.
- The association between method and class is called binding.
- Methods are sometimes confused with functions, but they are distinct, so be aware of this.