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.

Start your free trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Build a Quiz Challenge, Part 2 Solution

I don't know what I'm doing wrong

JavaScript Quiz

You got 2 question(s) right. You got these questions correct:

  1. How many states are in the United States?
  2. How many legs does an insect have?

You got these questions wrong:

  1. How many continents are there?

This appears when I did the quiz. What I'm I doing wrong? I'm not sure.

Hey Cristian,

Can you post your code?

Steven Parker
Steven Parker
229,785 Points

The best way to share your code would be to make a snapshot of your workspace and provide the link to it.

1 Answer

Hua Liu
Hua Liu
5,927 Points

I think, instead of using "correct.push(question)"and "wrong.push(question)", you may use "correct[i]=question", am I right? If that is the case, please use push instead :)