+ 1
Are functions meant to encapsulate the boilerplate code?
I read that boilerplate code is the type of code which appears again and again in the program. So can we conceptually say that the purpose of functions in the program is to encapsulate the boilerplate code?
1 Antwort
+ 3
yeah, when you write the function you don't need to rewrite th3 code over and over again all you need to do is call the function wherever you need it, as many as you like