In the example below, I have shown how to pass 2 parameters in a Javascript function.
Pass 2 parameters in a Javascript function
function myFunction(one, two) {
alert(one); alert(two);
}
myFunction(1,2);
Try it Yourself »
If you want to pass 3 parameters in this function, then you can also do that.
Pass 3 parameters in a Javascript function
How to pass multiple parameters in a Javascript function
function myFunction(one, two, three) {
alert(one); alert(two);alert(three);
}
myFunction(1,2,3);
Try it Yourself »
Comments (0)