If the function is called as a method of an object, the attribute is added to the object. x.FunctionX(); x.AttributeX has the value "a value".