Word Blanks poor instructions, impossible to understand what i am doing wrong

Tell us what’s happening:
worse written, and more confusing, your instructions could not possibly be, there are people here trying earnestly to learn some new skills. In order to do so your instructions have to be much more succinct.
I have read reread searched all over and this challenge is by far the most pathetically described and explained of the whole course, at this point i have no idea what I am doing wrong, and the replys of the testing are no help what so ever

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "The " + myAdjective   +  myNoun   +  myAdverb  +  myVerb + " around the tree. ";

  // 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 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0.

**Link to the

As per the instructions:

You will also need to account for spaces in your string, so that the final sentence has spaces between all the words.

Your solution returns "The bigdogquicklyran around the tree. "

1 Like

it has never given me any return results at all… ever…

This line means that the function returns the string that you created above.

Tell us what’s happening:
im not getting any feedback in the return result area, I a newb here and i see that there are many people with much more experiance than I have that can NOT understand this assignment, if some one with programing experiance cant understand this , how is a technological caveman as myself supposed to understand this?

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "The " + "myAdjective " + "myNoun "+"myAderb "+"myVerb " +"around the tree. ";

  // 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 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0.

*Link to the challenge:

Please do not create multiple threads based on the same issue. I have merged your two threads.

yes and in that area of result return, there has never appeared any result, return, word, or charecter… nothing.

The results area will not print all of the values returned by your funciton. If you would like to inspect a value, you can use a console.log() statement and view your browser’s console. Another alternative is to use a tool like repl.it which has a built in “console” which prints returned results.

and those are wht exactly?

With this t doesn’t work because you changed all your variables to strings and so the values are not passed in anymore - be careful with where you put the quotes adding the spaces in

You are doing exactly the opposite things remember if you put something within " " elements you want to get the litteral string inside and if you work with variables you don’t have to put them inside a “”

let a = "text"
console.log(a) //expect output is text

and

let s = "text"
let result = s //<= see the difference between using a variable and litteral string ?

Repl.it is a website where you can create your scripts and websites, the code editor there works differently than here in FCc

console.log() is a statement that print things to the console. console.log("Hi") will print "Hi" to the console

As a beginner you may also find useful a tool like

http://pythontutor.com/javascript.html#mode=edit

thanks I ll take a look at it ,
what does this phrase mean…wordBlanks(“dog”, “big”, “ran”, “quickly”) should contain all of the passed in words separated by non-word … what is it that they are refering to by …passed in words???

When you declare a function you can also add parameters to a function
The variables in the round parenthesis are parameters

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {

Then a function is called like

wordBlanks(“dog”, “big”, “ran”, “quickly”) 

And you pass in arguments (in the round parenthesis) that will be assigned as a value of the parameters of the function

A function returns a value, and wordBlanks(“dog”, “big”, “ran”, “quickly”) has the value of the string you build, because that is the thing returned with the return keyword

Functions are a thing that will be explained if you continue with the curriculum

so in other words … they expect me to correctly use a construct that they have not yet taught me???
how exactly is that supposed to work???

They expect you to create a string using variables, not to build the function - the function is just there for testing purposes

thanks so much everyone for your help, i finally got it… i needed to put the spaces inside quotation marks to hold their places.

@ArielLeslie, @ilenia I created a PR an attempt to simplify this challenge. So many campers get confused by the function syntax introduced here even though functions are not explained until several challenges later in the Basic JavaScript section. The intent of the challenge is to teach campers how to create new strings by concatenating variables and other strings, so I tried to capture that intent with my suggested changes.

See below for my proposed changes to the instructions and to the challenge seed code.

I think you change the example code to show that you need to put quotation marks around the spaces as to make them place holders, that was the only part of exercize that was not clear to me at all…

@tiroloquo That is a good point about the example. I will make the correction too. You would be amazed how many campers get confused by the function syntax though.

See below for my changes to the example with the spaces which will match the provided sentence.