What's the advantage of having parameters/arguments?


#1

Question

What’s the advantage of having parameters/arguments?

Answer

Parameters/arguments are invaluable when using the same function for different data. For example, a function that multiplies its input by 2 will give wildly different answers when input is 1 or input is 99!