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

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.