Word Blank - Is something wrong with my task?

Tell us what’s happening:
I just started using Javascript and I feel like I have a good understanding of it so far. This task, however, I am not sure I understand.

I tried making a fill-in-the-blank like the example shown.
I am told that my wordBlank should contain all the words used, as well as my own, but I do not see how that is possible since I am to only write in one line.

I tried looking the answer up, as well as watching the video, but their programming just seems way different. They make a variable called “result” and create a function as well, though the task does not mention it at all.

This is how their answer is:
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = “”;
// Your code below this line
result +=
"My " +
myAdjective +
" " +
myNoun +
" " +
myVerb +
" very " +
myAdverb +
“.”;

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks(“dog”, “big”, “ran”, “quickly”);

And this is how mine looks (so to me it just seems like different tasks, though they really are not):
Your code so far
var myNoun = “dog”;
var myAdjective = “big”;
var myVerb = “ran”;
var myAdverb = “quickly”;

var wordBlanks = “the” + myAdjective + myNoun + myVerb + myAdverb; // Only change this line;

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

This is actually an advance challenge it’s not you. They will alter it in the future since it includes material we haven’t done yet.

as the challenge has changed (I did not check, sorry!) I will change my answer: your issue is that the variables are not separated by ‘non word characters’!
right now the value of worldBlanks is thebigdogrunquickly

it has not yet been introduced, but you can check the value of the variable if you add console.log(worldBlanks) as last line of your code mi

Ok, so I did that and completed the task - thank you.
But I am not sure what you mean with the console.log. Could you please elaborate and tell me more about what it does and where to put it exactly, thx, because I am not really sure.

you will meet it going forward in the curriculum

console.log() is a debugging tool, you can use it in your code to print the value of things to the console

var num = 56*46;
console.log(num); // this will make the value of num appear in the console
// if a piece of code is not working you add the console.log to check the values of variables to be sure things are doing what they should be doing

// other example
var firstName = "John";
var lastName = "Watson";
var fullName = firstName + lastName;
var greeting = "Welcome, " + fullName + "!";

console.log(greeting); // this will show "Welcome, JohnWatson!" you can then check the value of other variables to see where the issue is

// other example, using it to see changing values
var num = 1;
console.lo(num); // prints 1
num+=2;
console.log(num); // prints 3
num=-3;
console.log(num); // I was expecting 0 but the value is -3, so there is something wrong...

okay, thank you man.

I thought that the “magical girl” title was clear enough… I need to think of something else :thinking: