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
Peter Ramos
5,009 PointsIs there a reason that the names of constructor functions seem to always be capitalized?
So far in JavaScript we have used camel case ...ex) camelCase ... when naming things. I've noticed in this course that all the constructor functions have been named starting with a capital letter. In addition in the "Object.create" method the word "object" is also capitalized. This is a little confusing and I was just wondering if there was a reason for this? Thanks!
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! I might suggest taking a peek at the coding style/naming conventions in this MDN documentation. JavaScript uses upper camelCase to denote a JavaScript object. This is also a pretty typical convention among other languages such as C# and Swift when denoting a class. It is not limited to just JavaScript.
Hope this helps!
Peter Ramos
5,009 PointsPeter Ramos
5,009 PointsThanks this helps a lot! Been searching for something like this!