Junior JavaScript

What is the difference between parameters and arguments?

  • Parameters: variables listed in the function definition
  • Arguments: actual values passed to the function when calling it

Example:

function greet(name) { // name = parameter

console.log(`Hello ${name}`);

greet("Sandeep"); // "Sandeep" = argument

🔹 3. Closures and Lexical Scope – Q&A

More from JavaScript Tutorial

All questions for this course