A JavaScript function does not automatically validate the values of its parameters (arguments).
Earlier in this tutorial, you learned that functions can accept parameters.
function functionName(parameter1, parameter2, parameter3) { // code to be executed } |
Function parameters are the names specified in the function definition.
Function arguments are the actual values passed to the function and received by its parameters.
JavaScript functions don’t require data types for parameters, don’t check argument types, and don’t verify the number of arguments passed.