Arguments and Parameters

When The function is invoked, the arguments are the data you pass into the function’s parameters.

The argument is referred to as the values that are passed within a function when the function is called. The parameter is referred to as the variables that are defined during a function declaration or definition.

function sum(a, b) {
  return a + b;
}

sum(3, 5);

a, b inside function sum( ) are parameters

3, 5 inside sum ( ) are arguments.

Leave a Reply

Your email address will not be published.

ANOTE.DEV