Register now or log in to join your professional community.
Functions are used to DO specific things, whereas classes ARE specific things (class is a way of grouping functions (as methods) )
I accept answer of mr mohamed rehan
I think function we use when we need to deal with one task as power function- loop function then class we use when we need to deal with multi taskesin many form
Functions are the meat of your application and classes are more like the plate. It's messy to eat meat without a plate. But if you don't have any meat, you don't have a meal.