Build a Sentence Maker - Build a Sentence Maker

Tell us what’s happening:

It keeps telling me to pay attention to extra spaces and I have checked everything multiple times and i’m still incredibly confused. If anyone can help me with this, it would be greatly appreciated.

Your code so far

let adjective = "rowdy";
let noun = "bull";
let verb = "danced";
let place = "desert";
let adjective2 = "angry";
let noun2 = "flies"; 
const firstStory ="Once upon a time, there was a(n) "+adjective+ " " + noun + " who loved to eat " + noun2 + ". The " + noun + " lived in a(n) " + place + " and had " + adjective2 + " nostrils that blew fire when it was " + verb + ".";
console.log("First story: " + firstStory);
adjective = "pointy";
noun = "hat";
verb = "wear";
place = "top of a mountain";
adjective2 = "snazzy";
noun2 = "dust"; 
const secondStory = "Once upon a time, there was a(n) " + adjective + " " + noun + " that loves so much to eat " + noun2 + ". The " + noun + " Lives with me near " + place + " and it has a " + adjective2 + " look to it so whenever i see it I like to " + verb + " it.";
console.log("Second story: " + secondStory);




Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

  1. Create another story using the same template and assign it to the secondStory variable.

You didn’t use the same template, you created a new template.

This output

"The hat Lives with me near top of a mountain and it has a "

Does not match the template you were given.

 The [noun] lived in a [place] and had 

Follow each instruction more closely.

  1. You should declare a firstStory variable.

Declare the variable, don’t assign anything to it. Then move to user story 4

Hey, thanks for responding. I copied the format and everything but it keeps saying that it’s wrong, i’m really sorry, I just don’t get it.

Can you copy and paste your code here instead of a screenshot?

What does your output look like?

omg yes sorry

let adjective = "rowdy ";

let noun = "bull ";

let verb = "danced";

let place = "desert";

let adjective2 = "angry"

let noun2 = "flies"



let firstStory = "Once upon a time, there was a(n) " + adjective + noun + "who loved to eat " + noun2 + ". " + "The " +noun + "lived in a " +place + " and had "+ adjective2 + " nostrils that blew fire when it was " + verb +".";

console.log("First story: " + firstStory)



adjective = " pointy ";

noun = "hat";

verb = "worn";

place = "top of a mountain";

adjective2 = "snazzy";

noun2 = "dust";



let secondStory = "Once upon a time, there was a(n)" +adjective+ noun+" who loved to eat "+noun2+". "+ "The "+noun+" lived in a "+place+" and had "+adjective2+" nostrils that blew fire when it was "+ verb+".";

console.log("Second story: "+secondStory)

-thats the code

First story: Once upon a time, there was a(n) rowdy bull who loved to eat flies. The bull lived in a desert and had angry nostrils that blew fire when it was danced.
Second story: Once upon a time, there was a(n) pointy hat who loved to eat dust. The hat lived in a top of a mountain and had snazzy nostrils that blew fire when it was worn.

- then this is the output

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

You have added spaces within several of your variables. That is not the way to control your story spacing.

okay thank you so much!

oh okay. if you can possibly tell me how to add the spaces in correctly, that would help a lot.

You added a space at the end of this string. What, specifically, are you having trouble with?

I’m sorry i thought you were supposed to add spaces to make the output more readable. Is that not what you’re supposed to do?

Yes, just not here.

adjective = " pointy ";

The adjective is “pointy” not “space pointy space”

Yes, you are supposed to add spaces in your story string but not in your variable values.

Are you confused about how to add a space between two variables in the string?