Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Ryan Schmelter9,710 Points
Do func and arg have meaning themselves?
Although it's been a while since you asked this question I figured I'd post an answer for anyone else struggling.
The JS program starts by defining the say function. When say runs, it logs whatever argument you pass through it to the console.
When the exec function runs, it expects the first parameter passed to be a function and the second parameter to be an argument that will be passed into that function. Take a look at the function declaration in the exec function. Running exec(say, 'hi there'); calls the say function then passes 'hi there' into the parameter of the function. In other words the () is there, only within the function.
This is my first forum response and I'm not sure it makes sense, but I hope it helps clear it up haha.
Ezra Siton12,631 Points
No. You can use any name. This is only for the semantic (give meaning to vars, functions names) - you can change "func" to "abcde" and "arg" to "wow" or any name you want.
Besides Reserved Words: