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 Basics (Retired) Making Decisions with Conditional Statements The Conditional Challenge

Adam Csordas
Adam Csordas
8,195 Points

Can I get some feedback, please!! Thank you!!

If you want to share a workspace make a snapshot. In the workspace it's the first icon in the upper right corner that looks like a camera.

Adam Csordas
Adam Csordas
8,195 Points

Thank you Kris!!

Here is the snapshot!!

https://w.trhou.se/2u65ghlnld

1 Answer

Florian Woelki
Florian Woelki
10,607 Points

Nice job there!

Do you know of the principle DRY (Don't repeat yourself)?

If not, it is a concept, that you should apply on your project. You have some duplicated code there and you can simplify that easily by using an key value store. Even better, you can store the question and the answer in an JSON document and read it in JavaScript. Then you can make a for loop and avoid your duplicated code.

Keep on coding!

Cheers.

KaWai Guo
KaWai Guo
2,788 Points

Well we haven't been taught that function yet at this stage of the course. So how about you lay off a little bit? ;) it's hard enough understanding this mook and his explanations let alone have you putting your 2 cents in. Post comments like this after the next section. Good day.