Contents

About parameter argument

   Jun 25, 2023     0 min read

This article is about parameters and arguments.

When you’re a developer, you’re going to write and talk about parameters and arguments a lot.

Parameters and arguments are used a lot, but I used to use them interchangeably. It turns out they’re not the same thing.

What are Parameters?

A parameter is a variable used in the definition part of a function or method. When you define a function or method, you declare a parameter, and that parameter accepts values that are used within the function or method. In other words, a parameter is used as an input to a function or method and can be passed a value when the function is called.

So what are arguments?

Arguments are the values that are passed to a function when it is called. When you call a function, arguments are passed to the function and assigned to parameters. In other words, arguments are a way of passing the values of the function’s expected parameters when you call a function or method.