A class can have functions declaration in its body. These functions are called member functions (or methods).
Member functionsare declared just like regular functions.
Member functions are called (invoked) with dot notation.
We can access class properties from member functions, make any necessary calculation and so on.
For example, the printHello() member function below prints a hello message using the name property of the class.
Output Inspire Coding
I hope the description was understandable and clear. But if you have still questions, then leave me comments below! 😉
Have a nice a day! 🙂