JavaScript Treehouse Club - MASH MASH - JavaScript Stuff You Can Change

Yarden Gur
Yarden Gur
2,744 Points

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