## Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

# no pop up window shows up??

```var questions = [
['How many states are in the United States?', 50],
['How many continents are there?', 7],
['How many legs does an insect have?', 6]
];
var question;
var response;
var correct=[];
var wrong=[];

function print(message) {
document.write(message);
}

function buildList(arr){
var listHtml="<ol>";
for var i=0; i<arr.length; i+=1{
listHtml+="<li>" + arr[i] +"</li>";
}
listHtml+="</ol>";
return listHtml;
}

for (var i = 0; i < questions.length; i += 1) {
question = questions[i];
response = prompt(question);
response = parseInt(response);
correct.push(question);
} else{
wrong.push(question);
}
}

html = "You got " + correctAnswers + " question(s) right."
print(html);
html+="<h2> you got this questions correct:</h2>";
html+= buildList(correct);
```

you have some issues with your buildList function. I am not sure what you are trying to accomplish in it, but you have an extra ":

``` var listHtml=""; for var i=0; i"
```

also that is not the syntax for a for loop:

```var i=0; i" + arr[i] +""; }
```

the loop should be something like this:

```for(var i=0; i < arr.length; i++) {
//do stuff
}
```

Hey Britta,

There were some issues with your code. As Jason pointed out, your for statement needed slightly redone. After the edit, you only needed parenthesis surrounding `var i=0; i<arr.length; i+=1`.

Also, you should not use the function `print()` because it is much slower than just calling `document.write()` itself and it causes issues with Safari because `print()` is a function for printing information from a page in Safari.

I also redid the bottom HTML and added a `wrongAnswers` variable, so that you can track wrong answers as well as right ones.

```var questions = [
['How many states are in the United States?', 50],
['How many continents are there?', 7],
['How many legs does an insect have?', 6]
];
var correct=[], wrong = [];

function buildList(arr){
var listHtml="<ol>";
for (var i=0; i<arr.length; i+=1){
listHtml+="<li>" + arr[i] +"</li>";
}
listHtml+="</ol>";
return listHtml;
}

for (var i = 0; i < questions.length; i += 1) {
question = questions[i];
response = parseInt(prompt(question));