DEV Community

Tejkumar Kempaiah
Tejkumar Kempaiah

Posted on • Edited on

🔥 Parameters v/s Arguments in JavaScript

Are both same or different?

📌 Parameters:

  1. They are integral part of a function
  2. Parameters are values which a function expects when its being invoked.
  3. A function could accept parameter in the form of a variable, array, object and another function which is referred as callback functions

Example:

image

📌 Arguments:

  1. They are integral part of a function at the runtime
  2. Parameters are values which are passed to a function at the runtime.
  3. If no arguments are passed to a function in JS, By default it takes undefined arguments.

image

Top comments (0)