Function parameters and return values
Function parameters are values that are passed into a function when it is called. These values are used by the function to perform some action or calculation. Parameters are defined in the function declaration, inside the parentheses after the function name.
Functions can also return values, which are values that are passed back to the code that called the function. The return keyword is used to specify the value to be returned.
Functions can also return undefined, which means that the function does not return any value. If the return keyword is omitted, or if no value is specified after the return keyword, the function returns undefined.
Functions can also take any number of parameters, including zero.
Finally, functions can also return functions, which are known as higher-order functions. This allows for advanced techniques such as function composition and currying.