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 trialRick Rana
10,285 Pointsfunction print(message) { } ?
I think I need a refresher. :( Is (message) simply a placeholder? I don't see a message variable in the code. If so, does it get updated when the message parameter is replaced and the function is called? Thanks.
3 Answers
Steven Parker
231,269 PointsIn a function definition, the parameter names represent the actual arguments that will be provided when the function is called. The name of any parameter is not important, but as a general practice a name is often chosen that reflects what the variable is used for within the function.
Cindy Lea
Courses Plus Student 6,497 PointsMessage is a parameter that will be referenced in the code when it is written. As is, it simply is saying the message will be passed to the function and the function will print it out.
Rick Rana
10,285 PointsGreat answers. Thank you for clearing that up.