Function Parameters & Arguments in Javascript

 Function Parameters & Arguments in Javascript


In this article we are goanna to see about Function Parameters & Arguments in Javascript and where we use these. which is most important when you are going to start your career in JavaScript. Please read and enjoy this article if you want to give any feedback about your experience, we welcome.




Function parameters are listed inside the parentheses () in the function definition.

Function arguments are the values received by the function when it is invoked.

Inside the function, the arguments (the parameters) behave as local variables.

Syntax:

function function_name(parameter1, parameter2,……){
Block of statement;
}
function_name(argument1, argument2,….);

Ex:

function myfunction(a, b){
document.write( a * b);
}
myfunction(4, 3);

Share:

0 comments

Please leave your comments...... Thanks