<!doctype html>
<html>
    <head>
        <script>
            var continents = ["Australia", "Africa", 
                              "Antarctica", "Eurasia", "America"];
            var response, count = 0;
          
            for (var index=0; index < continents.length; 
                              index++) {
                response = confirm("Have you been to " + 
                                    continents[index] + "?");  
                if (response) count++;
            }
            alert("You have been to " + count + 
                  " continents!");
        </script>
    </head>
</html>
