Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

Function Parameters

A JavaScript function does not automatically validate the values of its parameters (arguments).

Function Parameters and 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.

Parameter Rules

JavaScript functions don’t require data types for parameters, don’t check argument types, and don’t verify the number of arguments passed.