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

Can Tural
Can Tural
13,053 Points

Is the QuizUI code scalable?

We used a constructor function to create our quiz. In that way, we can create as many courses as we would like. But in our quizUI code we directly used the name of the quiz we created like, "quiz.getCurrentQuestion()" or "quiz.score". Because of that, even if we create a new quiz, we are not going to be able to use this interface. Wouldn't it be better if we used another way to create our quizUI code so that we could use it with different quizes?

Kyle Fratello
Kyle Fratello
5,052 Points

Can, I was thinking the same thing as you. It seems that only certain parts of this code look scalable. You would think that going through the trouble of putting everything into an object would be to make it easy to add new questions and quizzes, however this is not the case here. While this course was helpful for learning the syntax of OOP with javascript, I think it failed to demonstrate practicality in a larger application and put it in perspective of how this could actually be helpful.