Why should I make a function instead of just setting a variable?

Is it just me or would you just define functions with only one parameter as variables in real world coding? In other words, is it pointless to use a function instead of a variable unless you are using more than one parameter? Seems to me that this block exercise is over complicating what we are trying to achieve. I find that I am often feeling this way and that we should be given better examples of how these mechanisms would be used in the real world lol

There is no restriction on parameters. The list can be empty, contain one parameter or many. The main purpose of functions it to wrap code blocks so they can be re-usable.

8 Likes

Re-usability! Eureka… that clears it up. Thank you, sir!

3 Likes