## 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.

# I copied his code exactly but no prompt pops up when I run it.

//two dimensional array

var questions = [ ['How old is Steve?', 27], ['How old is Trevor?', 29], ['How old is the baby?', 0] ];

//variable to hold how many correct answers var correctAnswers = 0; //random question variable var question; //random answer variable var answer; //random response variable var response; //random html variable var html;

//function to print the dialogue to the screen function print(message) { document.write(message); }

//for loop that cycles through each iteration in the array based upon the arrays length for ( var i = 0; i < questions.length; i += 1) { //question is grabbing the first column in the array question = questions[i][0]; //answer is grabbing the second column in the array answer = questions[i][1]; //response holds the users answer and parses it to make it an integer response = parseInt(prompt(question)); if (response === answer { correctAnswers += 1; }

}

html = "You got " + correctAnswers + " question(s) right."; print(html);

Hi Nicholas, it is quite hard to read your code like that. I would suggest you have a look a the Markdown Cheatsheet. It shows you how you can convert simple text to HTML. Neverthelesss, try this code this should help you:).

```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 html;

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

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