'; 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 horizontal stripes does the White Bass have on its sides?", // 1st question 3, // correct answer "8", // choice 0 "57", // choice 1 "2", // choice 2 "7"); // choice 3 quiz[1] = new makeQuestion("How long may the Cotton Tail Rabbit be?", // 2nd question 0, // correct answer "14-19 inches", // choice 0 "38-50 inches", // choice 1 "8-10 inches", //choice 2 "5-7 inches"); quiz[2] = new makeQuestion("What are two of the Eastern Grey Squirrel's predators? ", 0, "dogs and tree climbing snakes", "bears and mice", "rabbits and frogs", "Cardnals and Parots"); quiz[3] = new makeQuestion("Which animal lives in many marshy areas around the Missouri River?", 1, "Cotton Tail Rabbit", "Dion Skipper", "Eastern Grey Squirrel", "White Bass"); // -->

Another Wildlife Quiz

Correct Quiz