Question: what is the difference between a method and a property?
Answer: The difference between property and method is that -- property is a value stored in the hash key, whereas method is a function stored in hash key. In this code sample. ... sayHello is the method of object, and it is a function. You can also access it using dot notation person.