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!
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
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,644 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: