Build a Sentence Maker - Build a Sentence Maker

Tell us what’s happening:

I dont know whats wrong here, I had a different code that wasnt working as well. a perfectly viable space between lines of code would ruin half my test so i compared it to someone else’s code, tried it their way, corrected the space mistakes and spelling errors, and I’m still stuck trying to wrangle this lab. They can be very temperamental.

Your code so far

let adjective;
adjective = "old";
let noun; 
noun = "woman";
let place;
place = "Forest";
let adjective2;
adjective2 = "small";
let verb;
verb = "flared";
let noun2;
noun2 = "fruit";

let firstStory;

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);

let newAdjective = adjective;
adjective = "brown";
let newNoun = noun;
noun = "bear";
let newNoun2 = noun
noun2 = "honey";
let newPlace = place;
place = "cave"
let newAdjective2 = adjective2;
adjective2 = "large";
let newVerb = verb;
verb = "cold";

let secondStory;

secondStory = "Once upon a time, there was a(n) " + adjective +" " + noun + " who love 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);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

Also, im not sure about the period after noun2 in both firstStory and secondStory. unsure of how to do that correctly or if its an issue. tried spacing them exactly the same but i still get the same issue for both regardless of how i do it.

Check your spacing here for the firstStory:

"." + "The "

The story asks for:

" [noun2]. The [noun] "

1 Like

I just saw that literally right before you replied. I changed it. but now its saying i have to put the variables for firstStory and secondStory in the correct order. I also had an uneccessary space after the console.log for both stories. So now steps 15 and 25 arent completing. Im not sure how to copy and paste the code without formatting issues.

```
let adjective;
adjective = "old";
let noun; 
noun = "woman";
let place;
place = "forest";
let adjective2;
adjective2 = "small";
let verb;
verb = "flared";
let noun2;
noun2 = "fruit";

let firstStory;

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);

let newAdjective = adjective;
adjective = "brown";
let newNoun = noun;
noun = "bear";
let newNoun2 = noun
noun2 = "honey";
let newPlace = place;
place = "cave"
let newAdjective2 = adjective2;
adjective2 = "large";
let newVerb = verb;
verb = "cold";

let secondStory;

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);

```

could it possibly be because the let variables werent done in the correct order from the start? problem is the rest of the steps say completed. I’m gonna try it and see what happens.

Hi there,

Please make sure there are no line breaks in the story strings.

Happy coding!

there aren’t its just a formatting issue.

edit : Nvm you are correct, sir. It finally worked. I thought it was just spacing but when i widened the view, it stayed the same so it was a space.

Are you sure about that? :slight_smile:

That space was like a chameleon, stealthily messing up lol. thanks, solved.

let adjective = “funny”;

let noun = “dragon”;

let verb = “running”;

let place = “cave”;

let adjective2 = “big”;

let noun2 = “pizza”;

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 = “scary”;

noun = “goblin”;

verb = “sleeping”;

place = “forest”;

adjective2 = “tiny”;

noun2 = “berries”;

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);

why tell me, this error You should assemble your first story using the variables you declared in the correct order.

Please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.

The easiest way to create a topic for help with your own solution is to click the Help button image located on each challenge. This will automatically import your code in a readable format and pull in the challenge URL while still allowing you to ask any question about the challenge or your code.

Thank you.