We go for functions to achieve optimized execution time with less complexity. Here size of the script will be more. It’s compatible with almost all tools