This lesson is a little bit complicated and I think they need to work on it.
I even can’t understand what is the question and the test.
Hope someone help me to learn it.
Your code so far
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = "";
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.
Thanks a lot for the explanation I understand it clearly but still I have the problem to finish this exercise because I can’t understand what it wants.
It wants you to take four variables, and construct a string with them. You have to join them somehow, add strings in as you like, but demonstrate that you know how to construct a string using both string literals and variables.
your variables are myNoun, myVerb, etc.
String literals are things like spaces, "The", "over the snow"… whatever. Anything that is letters and numbers and spaces, symbols, whatever. Anything in a string is a string literal.
Combine those things, and create a sentence, and pass that back.
In this case when you add two string it’s attached as a single word without space, and one of test said that you need to: ‘contain all of the passed in words separated by non-word characters (and any additional words in your madlib).’
Said that you need to add and and blank space between your parameters: + ' ' +