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.

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
217,469 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.