'; for (var i = 0; i < quiz.length; i++) { if (quiz[i].isCorrect()) correct++; } var score = Math.round((correct / quiz.length) * 100); correctPage += 'Score: ' + score + ' %'; if (correct < quiz.length) { correctPage += ifWrong; for (var i = 0; i < quiz.length; i++) { if (!quiz[i].isCorrect()) { correctPage += (i + 1) + '. ' + quiz[i].userChoices[quiz[i].correctAnswer] + '
'; } } } else correctPage += ifAced; correctPage += ''; correctwin = window.open ('', '', 'height=300,width=300,scrollbars=yes'); if (correctwin.opener == null) correctwin.opener = window; correctwin.location = 'javascript:opener.correctPage'; } // Message to display if quiz is aced. var ifAced = "

Well done, you aced it.

"; // Message to display if any are wrong. var ifWrong = "

Here are the correct answers to the questions you got wrong:

"; // Create four question objects... quiz = new makeArray(4); quiz[0] = new makeQuestion("How many square miles does the Missouri River drain?", // 1st question 1, // correct answer "623,000 miles", // choice 0 "529,000 miles", // choice 1 "463,000 miles", // choice 2 "560,000 miles"); // choice 3 quiz[1] = new makeQuestion("How many states does the Missouri River run through?", // 2nd question 2, // correct answer "8 states", // choice 0 "6 states", // choice 1 "7 states", //choice 2 "9 states"); quiz[2] = new makeQuestion("How many Red Cross troops were sent in to make refugee camps during the flood?", 3, "7,400", "7,600", "7,800", "7,500"); quiz[3] = new makeQuestion("About how many people sought refuge from the flood?", 0, "100,000 people", "110,000 people", "90,000 people", "105,000 people"); // -->

The Flood of '52 Quiz

Correct Quiz