Mad Libs Code not working

Tell us what’s happening:

For some reason my code is not passing. I don’t understand why, however.

Your code so far


var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";

var wordBlanks = "I " + "had" + " a" + myNoun + " that " + "was" + myAdjective + "that " + myVerb + "very " + myAdverb + ".";


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.

Challenge: Word Blanks

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/word-blanks

Your code’s logic is fine, the issue is you’re missing some spaces between your words.

Do console.log(wordBlanks) and you’ll see what the problem is.

1 Like