JS Functions Arguments
Arguments are local variables that are defined inside parentheses after function declaration and are accessed only inside the body of the function.
No outer scope has access to arguments unless the value of these arguments is returned from the function.
They are extremely powerful and useful feature as they allow us to parameterize the result of the function. The basic functionality remains the same but the result can alter based on the values we have passed to the arguments any time we call (invoke) the function.
Thus, functions can be really a re-usable piece of code, that we define only once, but we can call and execute the same functionality, with different results. The example above defines a function that accepts two arguments. The functionality is the same, it adds these arguments and returns the sum of them.
Calling the function by passing 10 and 15 as arguments returns 25,
second time same function, different arguments returns 45.