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 Treehouse Club - MASH MASH - JavaScript Stuff You Can Change

Hi, I managed to add another question in the html and css. But I can get it to work in the javascript

I think I broke the code because the answers box doesn't come up anymore. Would you take a look at my code and tell me what's wrong? https://w.trhou.se/kmpuas47m5 Thanks

1 Answer

Nichole Pellow
Nichole Pellow
8,206 Points

I know you asked this a while ago, but in case you never figured it out...

Under the fill_in_answers function, you put:

function fill_in_answers(answers) {
    // Find the spans that need filled
    var home = document.querySelector('#home');  // This says make a new variable and find the HTML tag that has the ID of "home" 
    var profession = document.querySelector('#profession');
    var pet = document.querySelector('#pet');
    var location = document.querySelector('#location');
    var name = document.querySelector('#luck');

Where it says var name, it should be var luck.

Also, I noticed on your JS file that under the mash options where you put different planets that you changed the random number to 5, but only have 4 planets listed. You should add a 5th planet as well :)

Hope that helps!