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 trialSamuel Thorpe
4,995 PointsThis 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
elk6
22,916 PointsLook 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.
Alicia Leslie
4,209 Pointsarguments
Lauri Neuding
13,525 PointsPerhaps the question needs a little syntax adjustment. It is confusing.
Jesse Hall
4,275 PointsYeah this is worded horribly.
Robert Araujo
Courses Plus Student 2,222 Points"Arguments" It is silly and confusing