Build a Sentence Maker

When I run my code everything passes except the log. But the console prints my story so I don’t understand what I’m doing wrong.

let adjective = "fast";
let noun = "car";
let verb = "drove";
let place = "monaco";
let adjective2 = "quick";
let noun2 = "brakes";
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 secondStory;
adjective = "black";
noun = "screen";
verb = "changed";
place = "japan";
adjective2 = "high";
noun2 = "sky";
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);

Please post a link to the lab/project. Thanks

Build a Sentence Maker

This space here is confusing the tests (and me).

I don’t understand. Is that not the correct syntax for logging something to the console?

I am talking about the space. Did previous examples of calling a function put a space in the place that I quoted from your code?

No it did not. I always thought there needed to be a space between the command and “instructions”. Kind of like with “let”

Generally no, there is zero space between the function name and the (

1 Like