Are both same or different?
📌 Parameters:
- They are integral part of a function
- Parameters are values which a function expects when its being invoked.
- A function could accept parameter in the form of a variable, array, object and another function which is referred as callback functions
Example:
📌 Arguments:
- They are integral part of a function at the runtime
- Parameters are values which are passed to a function at the runtime.
- If no arguments are passed to a function in JS, By default it takes undefined arguments.
Top comments (0)