Build a Sentence Maker - Build a Sentence Maker

Tell us what’s happening:

I am trying to log the message in the console but it keeps saying that I need to put it in a certain format, what format is that

Your code so far

let adjective = 'smarter';
let noun = 'boy';
let verb = 'open';
let place = 'village';
let adjective2 = 'strong';
let noun2 = 'ice cream';

let firstStory = "Once upon a time, there was a " + 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 = 'beautiful';
noun = 'girl';
verb = 'lifted';
place = 'city';
adjective2 = 'big';
noun2 = 'bread';

let secondStory = "Once upon a time, there was a " + 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);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

it’s this format here provided in the user stories:

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].

you need to use it for both stories unchanged

1 Like

I used it the way it is, another thing which is confusing me, what is that (n)

you did not use it exactly as is

the (n) is to indicate that the article can be read as a or an depending on what the next word is

you have Once upon a(n) time in the firstStory, which does not match the requested story format

and in the second one you have Once upon a time, there was one

now its not there and still things cant work out, I did copy and paste is it allowed

please help me i got stuck there i tried all means but things are not working out

Double check all the words and spacing match the examples. If it’s correct please share your updated code


okey let me try again

but also do we add space li + “ “ or after and before a string one ca do like “ he lived ”, because i tried both and things are not working out, i have been on this for more than an hour

post your updated code

let adjective = ‘smarter’;

let noun = ‘boy’;

let verb = ‘open’;

let place = ‘village’;

let adjective2 = ‘strong’;

let noun2 = ‘ice cream’;

let firstStory = “Once upon a time, there was a " + 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 = ‘cute’;

noun = ‘girl’;

verb = ‘lifted’;

place = ‘city’;

adjective2 = ‘high’;

noun2 = ‘chocolate’;

let secondStory = "Once upon a time, there was a " + 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)

Tell us what’s happening:

there is the updated code that has failed to work, please help me i am stuck here

Your code so far

let adjective = 'smarter';
let noun = 'boy';
let verb = 'open';
let place = 'village';
let adjective2 = 'strong';
let noun2 = 'ice cream';

let firstStory = "Once upon a time, there was a " + 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 = 'cute';
noun = 'girl';
verb = 'lifted';
place = 'city';
adjective2 = 'high';
noun2 = 'chocolate';

let secondStory = "Once upon a time, there was a " + 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)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.

thanks but i am just new here i do not know how to do that

so where is the a(n)?

i corrected it all and now it worked perfectly, thank you so much for assistance

why do we have that statement, is it supposed to be like that, I am not understanding if it is that way or it is a mistake.

Please create a new topic for questions about another challenge/step. Thank you.