Sometimes you need a function that takes an arbitrary number of arguments. These are the so-called variadic functions or, more precisely, functions with variadic arguments. Only one argument can be designated as variadic. Within the function body the variadic argument becomes an array. Let's write a function that takes some arguments and adds all the even ones while subtracting all the odd ones:
And now we can try it out: