Guide to solve this given in test didn't seem to be enough

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = " ";
// Your code below this line

result = "My " +result+myAdjective+ result+ myNoun +result+  myVerb +result+ 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/91.0.4472.124 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

Hi @hp1029728 !

Welcome to the forum!

I would suggest reseting the lesson.
The test has been designed to look for very specific things.

It is looking for wordBlanks to be a string.
Right now it is not.

Also, you are not supposed to change the value of myNoun , myVerb , myAdjective or myAdverb .

The straightforward way to solve this would be to change this line here without going through the process of creating a function.

// Only change code below this line
var wordBlanks = ""; // Change this line
// Only change code above this line

I would suggest add a console.log(wordBlanks) to the bottom of your page to check and make sure the results is correct in terms of spacing.

If you really want to create a function then you have to make sure the basic structure is correct so it doesn’t violate any of the FCC tests.

var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";
var wordBlanks;
function mySentence() {
  wordBlanks = ""; 
  return wordBlanks


I personally think creating a function is more work than necessary but it is up to you.

Hope that helps!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.