re: When do you create a function or method? VIEW POST


I create a function whenever I need to repeat code. Other than that, why tempt fate with an inheritance error.


That's the first time I heard the term inheritance error. Do you mean you will not create any classes?


No, I create them out of habit anyway. However, consciously I know I need to create one whenever I need something that will repeat itself somewhere else.

I also said inheritance error when I think I meant scope error.

code of conduct - report abuse