Hello, Devs...

So, I remembered a definition I struggled with back then in CS class and I decided to differentiate so others could learn from it.

What is the difference between

Parameters and Arguments?

A lot of devs use these terms interchangeably, it's really no big deal if you're writing codes but when documenting, you want to make sure you're passing the right information across to whoever's reading your article.

  1. Parameters are named variables which are declared during a function's definition.
  2. Arguments are the real values passed into the functions.

Alt Text

As you see in the example above, the parameter in the function is the name variable passed in during the function definition while the argument is the name Samuel passed in during function invocation.

You can use this link as a reference to understand better.

This post is also available on DEV.