Please my code isn’t passing this section “24. You should use the correct story format for the second story: “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].”. Pay attention to spaces.”
I have crosschecked spacing and spellings and nothing seems to be wrong with the code. Here is the code:
{
let adjective = “beautiful”;
let noun = “girl”;
let verb = “hot”;
let place = “hut”;
let adjective2 = “large”;
let noun2 = “Pretzels”;
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);
}
{
let adjective = “huge”;
let noun = “ogre”;
let verb = “hungry”;
let place = “cave”;
let adjective2 = “angry”;
let noun2 = “little rabbits”;
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 + “.”;
Please post your updated code if you need more help.
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
{
let adjective = "beautiful";
let noun = "girl";
let verb = "hot";
let place = "hut";
let adjective2 = "large";
let noun2 = "Pretzels";
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);
}
{
let adjective = "huge";
let noun = "ogre";
let verb = "hungry";
let place = "cave";
let adjective2 = "angry";
let noun2 = "little rabbits";
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);
}
```
So I removed the curled brackets and redeclared my let variables in the second story but without the “Let”
let adjective = "beautiful";
let noun = "girl";
let verb = "hot";
let place = "hut";
let adjective2 = "large";
let noun2 = "Pretzels";
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 = "huge";
noun = "ogre";
verb = "hungry";
place = "cave";
adjective2 = "angry";
noun2 = "little rabbits";
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);
```
Here’s the result I got from this code;
“// running tests 25. You should assemble your second story using the variables you declared in the correct order. // tests completed // console output First story: Once upon a time, there was a(n) beautiful girl who loved to eat Pretzels. The girl lived in a hut and had large nostrils that blew fire when it was hot. Second story: Once upon a time, there was a(n) huge ogre who loved to eat little rabbits. The ogre lived in a cave and had angry nostrils that blew fire when it was hungry."