What's the difference betn parameters & variables used in a function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the difference betn parameters & variables used in a function?

Are parameters variables described within 1st bracket of functions?

3rd Jul 2016, 4:07 PM
Abu
Abu - avatar
4 Answers
+ 1
Parameters are limits, variables are values that JS is assigning a datatype to behind the scenes.
3rd Jul 2016, 5:26 PM
CHAVA AMYAKAR
CHAVA AMYAKAR - avatar
+ 1
same
5th Aug 2016, 12:30 PM
Tammie Younger
Tammie Younger - avatar
0
they are the same
17th Jul 2016, 12:56 AM
Franklin Toribio María
Franklin Toribio María - avatar
0
examples: var x = 5, y=6; //x & y both r variables which has value of 5, 6. myFun(5, y); // 5, y both r parameters. it can be value or variable. function myFun(a, b){} //here a, b both r arguments where a=5 & b=y=6.
18th Jul 2016, 8:04 AM
Kanak Majhi
Kanak Majhi - avatar