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 Loops, Arrays and Objects Tracking Multiple Items with Arrays Useful Array Methods

function 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
Steven Parker
230,274 Points

:point_right: In 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
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

Message 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.

Great answers. Thank you for clearing that up.