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 Object-Oriented JavaScript (2015) Practice Project User Interface Code

Why is QuizUI object uppercase 'Q'?

This may seem petty, but shouldn't proper syntax be var quizUI = {} since it's an object? It kind of threw me off at first.

1 Answer

Steven Parker
Steven Parker
231,269 Points

You make a good point. It certainly doesn't seem to follow the naming convention that is used otherwise.

But on the other hand, when you look at how it is used, it is effectively a class containing only static methods So from that perspective it might make sense to capitalize it.

I can see the validity of either choice, but I think I'd lean towards the way it is done in the video because the capital serves as a reminder to treat it as a class of static methods.