var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";
// Only change code below this line
var wordBlanks = "The" + myNoun + "cat" + myAdjective + "small" + myVerb + "walked" + myAdverb + "slowly" + "."; // Change this line
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36.
wordBlanks should contain all of the words assigned to the variables myNoun, myVerb, myAdjective and myAdverb separated by non-word characters (and any additional words in your madlib).
Consider if your variables are separated by non-word characters. Like in sentences we write how allthewordsarenotlikethis.
var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";
// Only change code below this line
var wordBlanks = "cat" + myNoun + "small" + myAdjective + "walked" + myVerb + "slowly" + myAdverb + "."; // Change this line
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36.
Your code currently outputs: catdogsmallbigwalkedranslowlyquickly.
Your code needs to have the words separated by non-word characters (spaces).
Example: cat dog small big walked ran slowly quickly.
the words are already provided for you (nouns, verbs…). the challenge is to build it into one sentence. I’m not sure why you’re adding your own words (“cat”, “small”…)
in-order to form a proper sentence, you do need space between words, which are not provided, so you have to account for spaces.
This is a good practice when you can’t figure out what is wrong, and will show you what we’ve all been trying to explain. (You put spaces between the variables and strings but not sufficient spaces in the strings.)