I have defined a function which returns object which has property and a method. using the returned object I am calling the method inside the object to get the value of the p