- In a method, ‘this’ refers to the owner object.
- Additional information can also be added along with the object method.
Properties: A function may be divided into different property values, which are then combined and returned together.
For Ex: Student function contains the properties:
Return Value: It returns methods/functions stored as object properties.
Example 1: This example use function definition as property value.
Example 2: This example use storing property values and accessing without bracket ().
Example 3: Using function definition as property value and accessing with additional details.
- p5.js | SoundFile Object Installation and Methods
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.