Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Creating Reusable Code with Functions Review: Giving Information to Functions

What is the correct Answer.

I don't understand how this answer is incorrect.

None of the other answers seem correct. You also have another question within this same quiz that asks about "arguments" and uses the same phrasing to describe that it is a value that is passed back to the function when you call the function.

1 Answer

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,271 Points

the answers are correct. they may seem the same and they are similar, but actually different. parameters are internal variables in a function body. arguments are the values you pass into a function when you call it. so if i define a function myFunc(param){return param*2} you can see param is my internal variable that i am doubling and returning. param is the parameter of the myFunc function. later on when i call myFunc, the number i pass into it is the argument, so in myFunc(4), 4 is the argument. when myFunc runs, it stores the argument 4 in the parameter param, and executes the instructions in the function body, here, doubling the argument and returning it. myFunc's parameter is always param, but i can call it all day long with all sorts of arguments, 4, 6, 2, whatever i need. each time it is called, it takes one argument and returns its double.