Tell us what’s happening:
Your code so far
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = ' myNoun + "is a " + myAdjective + "animal and he " + myVerb + " fast and " + myAdverb';
// 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/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/word-blanks
your usage of quotes and double quotes is the problem.
Your code will result in the following being shown in the javascript console
Native Browser JavaScript
=> ’ myNoun + "is a " + myAdjective + "animal and he " + myVerb + " fast and " + myAdverb’
What you want is instead the final result to be:
dog is a big animal and he ran fast and quickly
To do that, you need to be careful where you put your quotes.
here’s an example of good and bad usage of quotes:
result = `myNoun`;
this will give us
myNoun
which is bad
instead we want:
result = myNoun;
and that correct way will give us
dog
Here’s a more complicated example:
var result = myNoun + " is my noun.";
this will give us
dog is my noun
hopefully you see from the above how to use the quotes.
if not, please review the exercise again for more information.