## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# Can someone review my code please I can't get the results to appear?

function print(message) { var pageLocation = document.getElementById("output"); pageLocation.innerHTML = message; }

var quizQuestions = [ ['What date is Christmas Day?', 25], ['How many days are there in a year?', 365 ], ['What is the maximum score on a snooker table?', 147], ]

var counter = 0; var userResponse; var actualAnswer; var correctList = []; var wrongList = [];

for (var i = 0; i <= quizQuestions.length; i += 1) { var question = prompt(quizQuestions [i][0]); answer = (quizQuestions [i][1]);

```    if (question === parseInt(answer)) {
counter += 1;
correctList.push(question);
} else {
wrongList.push(question);
}
}
```

function orderList (arr){ var list = "<ol>"; for (i=1; i <= arr.length; i + 1) {

```    list += ("<li>") + (arr[i]) + ("</li>");
}
list += ("</ol>");
return list;
```

}

print("You got total of " + counter + " questions correct!"); print("You got these questions correct" + orderList(correctList)); print("You got these questions wrong" + orderList (wrongList));

3. You are doing the `parseInt() on the wrong value in your`if` condition.
5. `console.log()` is your friend, try checking values all over your code