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

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

``` // 1. Create a multidimensional array to hold quiz questions and answers

const quiz = [
['What is 2 + 2', '4'],
['What animal has a very long neck', 'giraffe'],
['What is the capital of Canada', 'ottawa']
];

// 2. Store the number of questions answered correctly and incorrectly
const correctQuestions = [];
const incorrectQuestions = [];

/*
3. Use a loop to cycle through each question
- Present each question to the user
- Compare the user's response to answer in the array
- If the response matches the answer, the number of correctly
*/

for (let i = 0; i < quiz.length; i++) {
let answer = prompt(`\${ quiz[i] }`);

if (answer.toLowerCase() === quiz[i] ) {
correctQuestions.push('<li>' + quiz[i] + '</li>');
} else {
incorrectQuestions.push('<li>' + quiz[i] + '</li>');

}
}

// 4. Display the number of correct answers to the user

document.querySelector('main').innerHTML = ` 