Skip to content

Argument

Easy — everyone uses thisGeneral Dev

ELI5 — The Vibe Check

An argument is the actual value you hand to a function when you call it. If a function is a coffee machine and it needs beans and water, the specific beans and the specific water you pour in are the arguments. You're giving it the real things.

Real Talk

An argument is the actual value passed to a function at call time. It is often confused with 'parameter' — parameters are the names in the function definition; arguments are the values provided when calling it. Some languages support named, default, and variadic arguments.

Show Me The Code

function greet(name: string) { // 'name' is the parameter
  return `Hello, ${name}!`;
}

greet("Alice"); // "Alice" is the argument

When You'll Hear This

"Pass the user ID as an argument." / "The function takes three arguments: start, end, and step."

Made with passive-aggressive love by manoga.digital. Powered by Claude.