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 Creating Reusable Code with Functions

Samuel Thorpe
Samuel Thorpe
4,995 Points

This is getting silly

Can you help me answer this? When you call an function, you can pass that function one or more.......(What??) .

5 Answers

Look at it like this. When you make a function you can optionally pass it some parameters. For example:

function sumOfNum ( num1, num2) {
return num1 + num2;
}

num1 and num2 are the parameters of the function you create. When you call the function you pass it some arguments. 2 in this case. They will replace the parameters you gave the function.

So:

sumOfNum (5, 6);

5 and 6 are the arguments and the function will return the sum of those arguments.

Hope this helps.

Perhaps the question needs a little syntax adjustment. It is confusing.

Jesse Hall
Jesse Hall
4,275 Points

Yeah this is worded horribly.

"Arguments" It is silly and confusing