Is there a third pane in the JS section?

I hope this is the correct place to ask this.

When I went through the html/css training pages, there were three panes on each page.
The left pane had instructions
the middle pane was for typing
the right pane had the output from the html/css

The js section only appears to have two panes. on the left for instructions and on the right for my answers.

I am wondering if I’m missing something, because of this sentence in the hints for the “MadLibs” example:

We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to make sure all of the provided words appear in the output, as well as your extra strings.

Where is this output?

(By the way, This page makes absolutely no sense to me. I only “passed” it because I copied the answer from the hints page. But I don’t know what I am supposed to learn from this page.)

For the JavaScript section, there is no output screen currently. You will learn a little later in the curriculum how to debug your code, which will allow you to see what your functions are returning.

Instead of copying/pasting code you do not understand to “pass” a challenge, you should first use the Ask for Help button on the challenge which will let you ask a formal question and it will automatically put any code you have created for the challenge along with the challenge url into the same post.

We will do our best to answer your questions, but you must be specific in what you do not understand when you ask. Don’t just say “Help Me”. It wastes time, because someone will have to take the effort to respond back with “What do you need help with?” and then you still will need to tell us.

Thanks. Got it on the output. I think the hint page might need to be redone so it doesn’t tell me I can “test my output with different words.” Since there is no output.

This is the first time I’ve copy/pasted the answer. I tried several answers similar to the “correct” answer, it returned error messages such as

wordBlanks("cat", "little", "hit", "slowly") should contain all of the passed in words separated by non-word characters (and any additional words in your madlib).

Where the heck do cat, little, hit, and slowly come from? I didn’t use them.

By then I was so confused as to what I was supposed to do that I gave up and copy/pasted.

If I haven’t driven you away, can you let me know the functional difference between my answer:

result = "The " + myNoun + "ate a " + myAdjective + "very " + myVerb + myAdverb + ".";


result+= "My "+myAdjective+" "+myNoun+" "+myVerb+" very "+myAdverb+".";

which is the answer that passed.

Thank you for your time. I appreciate it.

Behind the scenes, the FCC testing program will attempt to call the function you have created with the arguments seen. The “cat” is the 1st argument and “slowly” is the 4th argument. These argument values are passed into the function and become the variable names (parameters) you see in the function definition (below).

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

You then, will use all of these variable names to create a generic sentence. You will have to create some additional filler words like “The” or “a”, applicable spacing and some punctuation to make it a real sentence. Your sentence string should be assigned to the result variable, so that the last line of the function (seen below), it returns the sentence.

return result;

1st Attempt
Assuming the test case of wordBlanks(“cat”, “little”, “hit”, “slowly”), your first attempt below

result = "The " + myNoun + "ate a " + myAdjective + "very " + myVerb + myAdverb + ".";

will actually return the string "The catate a littlevery hitslowly."

2nd Attempt

result+= "My "+myAdjective+" "+myNoun+" "+myVerb+" very "+myAdverb+".";

If you already declared result as a blank string ( var result=""; ) on a previous line, then second attempt would return the string "My little cat hit very slowly."

1 Like