Word Blanks never been good at grammar pls help

Tell us what’s happening:

i remember the literal but at the same time drawing a blank. i have never been particularly good at grammar so this is confusing

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "";
   result+= "my name"+""+myNoun+"i am"+""+myAdjective+"i am a"+""+myVerb+"i am very"+""+myAdverb;

  // Your code above this line

  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly","fastly");
wordblanks("cat", "little", "hit", "slowly")

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/word-blanks/

This is the output of your function:

'my namedogi ambigi am arani am veryquickly'

The first thing i notice is the lack of spaces between the function arguments and the string.
For example

'[...] i ambigi am [...]'

It’s probably better formatted as

'[...] i am big i am [...]'

Hope this helps :slight_smile:

1 Like
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "";
  result = "Your " + myNoun + " "+ myAdjective + " " + myVerb + " " + myAdverb;
  // Your code above this line
  return result;
}

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

irony is i forgot about the simplest thing concatention and just wasnt thinking of how to put this together. the code above is whati managed to come up with and it went thru. lol. tyvm for the help.