JavaScript JavaScript Basics (Retired) Working With Numbers The Mad Libs Challenge Revisited

Hoessein Abd
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Hoessein Abd
Python Web Development Techdegree Graduate 19,106 Points

The prompt is not showing up.

Can anyone review my code please? The prompt isn't showing up:

var questions = 3; 
var questionsLeft = ' [' + questions + ' questions left]': 
var adjective = prompt('Please type an adjective' + questionsLeft);
var verb = prompt('Please type a verb');
var noun = prompt('Please type a noun');
alert('All done. Ready for the message?');
var sentence = "<h2>There once was a " + adjective;
sentence += ' programmer who wanted to use JavaScript to ' + verb;
sentence += ' the ' + noun + '.</h2>';
document.write(sentence);

1 Answer

Jazz Jones
Jazz Jones
8,535 Points

Check your second line. You may be missing a semi-colon.