'; 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 long is the Missouri River?", // 1st question 2, // correct answer "2566 miles", // choice 0 "2366 miles", // choice 1 "2466 miles", // choice 2 "2766 miles"); // choice 3 quiz[1] = new makeQuestion("Where does the Missouri River begin?", // 2nd question 1, // correct answer "St. Louis, MO", // choice 0 "Three Forks, MT", // choice 1 "Bismarck, ND", //choice 2 "Sioux City, IA"); quiz[2] = new makeQuestion("How high was the final crest of the Flood of '52?", 3, "29.4 ft", "36.2 ft.", "34.3 ft.", "31.5 ft."); quiz[3] = new makeQuestion("How much land was covered by the river during the flood?", 0, "187,000 acres", "115,000 acres", "114,000 acres", "190,000 acres"); // -->

The Flood of '52 Quiz1

Correct Quiz