Please I don't know how to go abt this one

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

   **Your code so far**
const myNoun = "dog";
const myAdjective = "big";
const myVerb = "ran";
const myAdverb = "quickly";
const a = "cat";
const b = "little";
const c = "hit";
const d = "slowly";

// Only change code below this line
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb,a,b,c,d)
{
var result = "";

result =  "The " + myAdjective + " and fiesty " + myNoun + " have " + myVerb + " very " + myAdverb + "." + " My " + b + " " + a + " has been " + c + " " + d + ".";


wordBlanks("dog", "big", "ran", "quickly");
wordBlanks("cat", "little", "hit", "slowly");
return result;
}
// Only change code above this line
   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

You don’t have to create any functions in this solution. But if you want, then:

  1. rename your function, because you have to assign the resulting string to the wordBlanks const. You can’t use this name for your function.
  2. delete function calls that inside your function
  3. call your function with the proper arguments (pass all the global consts you defined), and assign the result to the wordBlanks const.
const myNoun = "dog";
const myAdjective = "big";
const myVerb = "ran";
const myAdverb = "quickly";
const a = "cat";
const b = "little";
const c = "hit";
const d = "slowly";

const wordBlanks = buildString(myNoun, myAdjective, myVerb, myAdverb, a, b, c, d)

function buildString(myNoun, myAdjective, myVerb, myAdverb, a, b, c, d) {
  return "The " + myAdjective
       + " and fiesty " + myNoun
       + " have " + myVerb 
       + " very " + myAdverb + "."
       + " My " + b + " " + a + " has been " + c + " " + d + ".";
}

Thanks I’ve figured it out

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