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 trialReuben Lecky
7,690 PointsFunction Parameters
How does the function know what the parameters mean, such as: upper, width, length, and unit. These make sense to me but are these special words in JavaScript.
2 Answers
jrabello
17,917 PointsIn programming languages there are what we call "tokens", those tokens have a semantic meaning, there are SOME reserved keywords that cannot be used as a variable name like -> "function"
"function" is a reserved keyword, all the others you said are not
Steven Parker
231,269 PointsAs Ali pointed out, the words have no special meaning to JavaScript, but it's good programming practice to use parameter names that reflect what the parameter is used for. For example, a function that sets an element width would work just as well if the parameter was named "banana", but it would be easier to read and understand the code if it is named "width".
Ali .
15,521 PointsAli .
15,521 PointsGood question.
No is not special words for javascript. it's like a variable and you can write any words, and I think should be using them on include of the functions only.