Advertisement
728x90
Parameter is the variable name of a function definition whereas an argument represents the value given to a function when it is invoked. Let's explain this with a simple function
javascript
1function myFunction(parameter1, parameter2, parameter3) {
2 console.log(arguments[0]); // "argument1"
3 console.log(arguments[1]); // "argument2"
4 console.log(arguments[2]); // "argument3"
5 }
6
7myFunction("argument1", "argument2", "argument3");Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 86
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
343of476