I can’t figure out what I’m doing wrong with this one. The assignment asks to concatenate a string with 4 given variables. I added words to make a sentence out of it but it will not pass the test. Here’s my code:
var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";
// Only change code below this line
var wordBlanks = "My " + myNoun + " was " + myAdjective + " and " + myVerb + "very " + myAdverb + ".";
// Only change code above this line
Unlike us humans computers do not care for spaces between the elements we use, unless it is passed in a string:
example:
var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";
// your solution
var wordBlanks ="My "+myNoun+" was "+myAdjective+" and "+myVerb+"very "+myAdverb+".";
// logs "My dog was big and ranvery quickly."
Problem with your code is the lack of space in "very ":
var wordBlanks = "My " + myNoun + " was " + myAdjective + " and " + myVerb + " very " + myAdverb + ".";
// logs "My dog was big and ran very quickly."