+ 2

What is the difference between parameter and arguements??

20th Jun 2016, 1:36 PM
Alaa Sabbagh
Alaa Sabbagh - avatar
2 Answers
+ 7
A parameter is what the function needs to operate. An argument is what you pass to the function as a parameter.
20th Jun 2016, 2:30 PM
undefined
+ 7
parameters don't change. So if your function has a parameter called fruit it doesn't matter what value you try to put into the parameter called fruit the parameter itself is always called fruit. And then you can use that variable which is the parameter called fruit in your function where it replaces the parameter fruit with the value you sent it from your argument. The argument is what you sent when you called the function. So you can call a function many times and send different arguments but it will always end up inside the parameter called fruit.
22nd Jun 2016, 1:23 AM
DevCoder (John Sullivan)
DevCoder (John Sullivan) - avatar