test by gkwithmath TEST 1 Question x of y function Quiz(questions) { this.score = 0; this.questions = questions; this.questionIndex = 0; } Quiz.prototype.getQuestionIndex = function() { return this.questions[this.questionIndex]; } Quiz.prototype.guess = function(answer) { if(this.getQuestionIndex().isCorrectAnswer(answer)) { this.score++; } this.questionIndex++; } Quiz.prototype.isEnded = function() { return this.questionIndex === this.questions.length; } function Question(text, choices, answer) { this.text = text; this.choices = choices; this.answer = answer; } Question.prototype.isCorrectAnswer = function(choice) { return this.answer === choice; } function populate() { if(quiz.isEnded()) { showScores(); } else { // show question var element = document.getElementById("question"); element.innerHTML = quiz.getQuestionIndex...