function. Here a function can be instantiated using
new keyword. The member variables and methods in function can be assigned using keyword
Here is a basic example code
Additional notes on prototype
Here we defined member function in constructor. In general it is better to define member function in prototype as it will create only one instance of the function even when multiple instances are created.