## 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. # Feedback please - This is how I did the challenge (28 lines).

```function print(message) {
document.write(message);
}
[prompt('How many states are in the united states?'), 50],
[prompt('What is the color of the sky?'), 'blue'],
[prompt("What's the color of apple?"), 'red']
];
var counter=0;
function printResult (questions) {
var correctAnswers='<h2>Questions that you got correct</h2><ol>';
var wrongAnswers='<h2>Questions that you got wrong</h2><ol>';
for (var i=0; i < questions.length; i+=1) {
if (questions[i]===questions[i]) {
correctAnswers+= '<li> You got question number ' + [i] + ' correct! The answer is '+ questions[i] + '</li>';
counter +=1;
} else {
wrongAnswers+='<li> You got question number ' + [i] + ' wrong. The answer is '+ questions[i] + '</li>';
}
}
print('<p>You got a total of ' + counter + ' correct answer/s out of ' + questions.length +
' questions.</p>');
}
```

WOW That website was amazingly great! 3x Better than I thought it will According to me these are the slight changes that must be made to your program.

```function print(message) {
document.write(message);
}
[prompt('How many states are in the united states?'), '50'],
[prompt('What is the color of the sky?'), 'blue'],
[prompt("What's the color of apple?"), 'red']
];
var counter=0;
function printResult (questions) {
var correctAnswers='<h2>Questions that you got correct</h2><ol>';
var wrongAnswers='<h2>Questions that you got wrong</h2><ol>';
for (var i=0; i < questions.length; i+=1) {
if (questions[i]===questions[i]) {
correctAnswers+= '<li> You got question number ' + [i+1] + ' correct! The answer is '+ questions[i] + '</li>';
counter +=1;
} else {
wrongAnswers+='<li> You got question number ' + [i+1] + ' wrong. The answer is '+ questions[i] + '</li>';
}
}