Tell us what’s happening:
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/76.0.3809.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/word-blanks
The challenge wants you to only change the line that is now: var result = "";
.
The line: return result;
takes care of returning the result from the function. You don’t have to change that line.
The subject of this challenge is about concatenating strings, so it wants you to put the function parameters together in one string variable (var result
) with the concatenation operator (+).
For example, if you would have two strings, you could put them together in one variable like this:
var myFirstString = "Hello";
var mySecondString = "you";
var result = myFirstString + " " + mySecondString;
After this, the result
variable would have “Hello you” in it.
Does this make it more clear?
1 Like